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

flipped entities repr for ordering #357

Merged
merged 2 commits into from
Mar 27, 2024
Merged

Conversation

sanbox-irl
Copy link
Contributor

@sanbox-irl sanbox-irl commented Dec 6, 2023

needed, fulfills #317.

fwiw -- i feel pretty iffy about changing the bit repr. I know that hecs says that it "doesn't promise anything" but this library is used a lot! personally, i'd leave the old bit repr in place

@Ralith
Copy link
Owner

Ralith commented Dec 6, 2023

What if we deem it a breaking change? We could just tinker with the Ord impl, but that might have similar risks anyway.

@sanbox-irl
Copy link
Contributor Author

If you're comfortable with that, I'm comfortable with that, but I'd say that the Ord change is "higher level" than the bit fiddling changes, so it feels simpler to understand.

@sanbox-irl
Copy link
Contributor Author

I have a clearer answer now why i don't support the bit flipping -- adjusting the Ord is useful for users and simply makes more sense. Adjusting the bit encoding, on the other hand, does very little IMO except seem sensible in some obscure "the representation in bits should match the structs layout", which we aren't really committing to ofc, since we're handling the casting from struct to u64. As a result, changing the ord is sensible for users and purely better, so it's worth the breakage. Changing the bit repr, on the other hand, has no motivation to me except to make ord and bit's ord stay aligned, which is imo a non-goal

@sanbox-irl
Copy link
Contributor Author

@Ralith bumpin this for your thoughts

@Ralith Ralith merged commit 1b76f23 into Ralith:master Mar 27, 2024
5 checks passed
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