core-lang / core

The Core Programming Language
https://core-lang.dev
MIT License
45 stars 1 forks source link

validate existing equality and identity semantics #88

Closed soc closed 9 months ago

soc commented 9 months ago

Let's avoid a design embarrassment such as https://github.com/rust-lang/rfcs/pull/3535 and ensure/test that the semantics work correctly as specified in https://soc.me/languages/equality-and-identity-part3.

This means Identity compares bits, Equality offers a user-provided equality, and Hash works to facilitate patterns such as identical || equal that are commonly found in hash-based collections.

note: all tests should include special floating-point values (zeros, NaNs, infinities).

soc commented 9 months ago

90 has been split from this issue.