Closed Bug 980828 Opened 11 years ago Closed 6 years ago

Generator and array comprehensions should support destructuring binding

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: wingo, Unassigned)

References

Details

(Keywords: feature)

The first version of ES6 array and generator comprehensions (bug 979865) does not do destructuring binding. It should.
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: [js:p1]
This may be handy in cases like this (from bug 1164028): events: { mainview: { focus(event) {}, }, filter: { input(event) {}, }, }, So, instead of: this.boundEventHandlers = [ for (elementName of Object.keys(this.events)) for (eventName of Object.keys(this.events[elementName])) [elementName, eventName, this.events[elementName][eventName].bind(this)] ]; I could use: this.boundEventHandlers = [ for ([elementName, events] of Iterator(this.events)) for ([eventName, handler] of Iterator(events)) [elementName, eventName, handler.bind(this)] ]; However, I'm not sure what is the standard alternative to Iterator in this case...
Not an ES6 feature anymore; detaching from that dependency tree.
No longer blocks: es6
Summary: ES6 generator and array comprehensions should support destructuring binding → Generator and array comprehensions should support destructuring binding
Whiteboard: [js:p1]
This is not standard and i have not seen a corresponding proposal in https://github.com/tc39/proposals This bug should probably be closed and a new one re-opened when a proposal emerges and reaches stage 2 or 3 (or there is interest from the SpiderMonkey team to experiment before that)
Also, Generator and array comprehensions were removed somewhere in bug 1220564 and bug 1414340
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.