mozilla / rhino

Rhino is an open-source implementation of JavaScript written entirely in Java
https://rhino.github.io
Other
4.18k stars 851 forks source link

Support ES2015 default values inside destructuring assignments #756

Open Osiris-Team opened 4 years ago

Osiris-Team commented 4 years ago

            // default values inside destructuring assignments,
            // like 'var [a = 10] = b' or 'var {a: b = 10} = c',
            // are not supported
            reportError("msg.destruct.default.vals");
Osiris-Team commented 3 years ago

Wow thats great!

Osiris-Team commented 3 years ago

Seems like just a matter of years now.

gbrail commented 3 years ago

@Osiris-Team the fastest way to get that part of the standard implemented into Rhino is to submit a PR. There are a few of us here who are willing and ready to help you with that.

p-bakker commented 3 years ago

To expand on @gbrail comment: Rhino is an all-volunteer effort and as such hasn't got anyone working on it fulltime.

Cases are picked up based on own need/interest or general desire to move things forward.

We have recently made the effort to at least start creating cases for all the things where Rhino is not compatible with the latest EcmaScript spec and assigning those issues into milestones. But this is more to gain insight and hopefully inspire people to contribute, than a plan to start implementing all these things asap.

So, as @gbrail said: we welcome contributions!

p-bakker commented 2 months ago

1640 has moved the needle on this one significantly, if not completely resolved it

Waiting on analysis whether there's anything remaining (see https://github.com/mozilla/rhino/pull/1640#issuecomment-2365992097) before potentially closing this as done