Skip to content

proposal: Go 2: add random comparision operator, perhaps <> or <=> #46511

Closed
@malisetti

Description

@malisetti

Another option is to have an operator, perhaps <> or <=>, which randomly chooses whether the comparison succeeds or fails. This could be used to drive high-quality tests for fault-tolerant programming.

Originally posted by @robpike in #45319 (comment)

I am making this proposal inspired from the above comment. If have a random comparison operator and have control over it's randomness via build flags it would be useful to write tests and also code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions