Skip to content

Conversation

@jrb0001
Copy link

@jrb0001 jrb0001 commented Apr 26, 2025

This adds attributes to generate Eq/PartialEq/Ord/PartialOrd/Hash impls. Inspired by the Debug impl from #70.

@danlehmann
Copy link
Owner

First of all, thanks for your contribution. I am however not sure it's a good idea.

Should we really ignore unused bits in equality comparisons? I think a point could be made either way, so I'm a little hesitant to actually make a call here (if anything, I'd probably have opted for the opposite and included the unused bits - basically, just have PartialEq and Eq forward to the inner value).

Similarly for comparisons: Is declaration order really such an obvious one? So far, declaration order doesn't affect behavior in any way, so this would suddenly put some meaning on it.

Not saying we don't want this, but I think we need a bit of a discussion on why these are the choices that feel natural to you. What problem is this solving?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants