Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate existing equality and identity semantics #88

Closed
3 tasks done
soc opened this issue Dec 18, 2023 · 1 comment
Closed
3 tasks done

validate existing equality and identity semantics #88

soc opened this issue Dec 18, 2023 · 1 comment
Labels
enhancement improving existing functionality good first issue good for newcomers

Comments

@soc
Copy link
Collaborator

soc commented Dec 18, 2023

Let's avoid a design embarrassment such as rust-lang/rfcs#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.

  • check and test that contains uses identical || equal
  • rename has to includes, check and test that it uses identical
  • add missing blanket impls for Identity, because the compiler does not derive them automatically right now

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

@soc soc added enhancement improving existing functionality good first issue good for newcomers labels Dec 18, 2023
@soc soc added this to the 0.7 – new developments milestone Dec 18, 2023
soc added a commit that referenced this issue Dec 18, 2023
soc added a commit that referenced this issue Dec 18, 2023
@soc
Copy link
Collaborator Author

soc commented Dec 18, 2023

#90 has been split from this issue.

@soc soc closed this as completed Dec 18, 2023
soc added a commit that referenced this issue Dec 18, 2023
soc added a commit that referenced this issue Dec 28, 2023
soc added a commit that referenced this issue Dec 28, 2023
soc added a commit that referenced this issue Jun 1, 2024
soc added a commit that referenced this issue Jun 1, 2024
soc added a commit that referenced this issue Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improving existing functionality good first issue good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant