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

Set equality issues #192

Open
michbarsinai opened this issue Jul 12, 2022 · 0 comments
Open

Set equality issues #192

michbarsinai opened this issue Jul 12, 2022 · 0 comments
Milestone

Comments

@michbarsinai
Copy link
Member

ECMAScript's sets do not use state-based equality. This might interfere with verification:

This is from Deno, an independent JS engine.

$ deno
Deno 1.23.3
exit using ctrl+d or close()
> var s1 = new Set()
undefined
> var s2 = new Set()
undefined
> s1==s2
false
> s1.add(1)
Set { 1 }
> s2.add(1)
Set { 1 }
> s1 == s2
false
> s1 === s2
false

One override could be overriding the default Set() (NativeSet) with a java.util.HashSet wrapped to implement the standard ECMAScript api.

@michbarsinai michbarsinai added this to the PVG-1 milestone Mar 9, 2023
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

1 participant