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

Unified: AnyHashable(some BinaryInteger) #103

Open
oscbyspro opened this issue Sep 25, 2024 · 1 comment
Open

Unified: AnyHashable(some BinaryInteger) #103

oscbyspro opened this issue Sep 25, 2024 · 1 comment
Labels
addition oh, so shiny! await can't be done yet brrr such code, much wow

Comments

@oscbyspro
Copy link
Owner

oscbyspro commented Sep 25, 2024

With arcane knowledge from the depths of (#101), I should be possible to write a BinaryInteger -> AnyHashable that preserves generic equality and hash values for all binary integers. I haven't worked out the details yet, but it's on my radar.

Note that Swift's Swift.BinaryInteger -> AnyHashable truncates integers to 64 bits, so it doesn't work for the purposes of this project, which means that AnyHashable(BinaryInteger) != AnyHashable(Swift.BinaryInteger).

@oscbyspro oscbyspro added the brrr such code, much wow label Sep 25, 2024
@oscbyspro oscbyspro added this to the Ultimathnum 0.10.0 milestone Sep 25, 2024
@oscbyspro oscbyspro added the addition oh, so shiny! label Sep 25, 2024
@oscbyspro
Copy link
Owner Author

oscbyspro commented Sep 25, 2024

Noooooooo! protocol _AnyHashableBox is internal so I can't conform to it 😞

@oscbyspro oscbyspro added the await can't be done yet label Sep 25, 2024
@oscbyspro oscbyspro changed the title Unified: AnyHashable(BinaryInteger) Unified: AnyHashable(some BinaryInteger) Sep 25, 2024
@oscbyspro oscbyspro removed this from the Ultimathnum 0.10.0 milestone Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition oh, so shiny! await can't be done yet brrr such code, much wow
Projects
None yet
Development

No branches or pull requests

1 participant