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

Bitsets equality compares implementation artifacts, not actual bit values #5484

Open
hiiamboris opened this issue Feb 19, 2024 · 0 comments
Open
Assignees

Comments

@hiiamboris
Copy link
Collaborator

hiiamboris commented Feb 19, 2024

Describe the bug

>> (make bitset! 100) = (make bitset! 0)
== false
>> (remove/key charset "❓b" "❓") = (charset "b")
== false

Also related: #614 #5480

To reproduce

(make bitset! 100) = (make bitset! 0)
(remove/key charset "❓b" "❓") = (charset "b")

Expected behavior

I expect bitsets to compare equal as long as for every bit n in the allowed range (find bitset1 n) = (find bitset2 n).

Strict equality could compare the implementation details, but it doesn't seem useful at a glance, so I would vote it to also behave same as normal equality.

Platform version
Red 0.6.5 for Windows built 17-Feb-2024/10:32:56+03:00 commit #58b8f89

@dockimbel dockimbel self-assigned this Feb 23, 2024
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

No branches or pull requests

2 participants