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

ES2025 New Set methods #1542

Open
p-bakker opened this issue Jul 29, 2024 · 4 comments
Open

ES2025 New Set methods #1542

p-bakker opened this issue Jul 29, 2024 · 4 comments
Labels
Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec feature Issues considered a new feature good first issue Great place to start if you're looking to start an open source "resume"
Milestone

Comments

@p-bakker
Copy link
Collaborator

https://github.com/tc39/proposal-set-methods

@p-bakker p-bakker added feature Issues considered a new feature Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec labels Jul 29, 2024
@p-bakker p-bakker added this to the ES2025 milestone Jul 29, 2024
@p-bakker p-bakker added the good first issue Great place to start if you're looking to start an open source "resume" label Aug 20, 2024
@camnwalter
Copy link
Contributor

Just an FYI for anyone else, a lot of the test262 tests for these methods fail because they use spread syntax and/or classes

@p-bakker
Copy link
Collaborator Author

Any idea if those test really depend on spread and classes? If not, we could consider creating a PR with the test262 project with changes that eliminate the dependency on spread and classes.

Recently did the same for some other code in test262 that used syntax Rhino couldn't handle and the test262 is quite receptive to such changes

@camnwalter
Copy link
Contributor

I don't think the spread is necessary. They are only used to compare the values in the set with the expected values in an array, at the very end. They could be using Array.from instead.

However, the classes are probably needed just for completeness.

@p-bakker
Copy link
Collaborator Author

p-bakker commented Sep 1, 2024

Just looked at the tests for the 'difference' method and the relative tiny subset of tests that use classes explicitly seem to test the method icw classes, so nothing that we can do about those (unless someone feels like taking a stab at implementing classes 🤪)

The use of the spread operator can be replaced with .apply in the tests, making them compatible with Rhino

Or we try to implement the spread syntax in Rhino 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec feature Issues considered a new feature good first issue Great place to start if you're looking to start an open source "resume"
Projects
None yet
Development

No branches or pull requests

2 participants