Closed
Bug 980828
Opened 9 years ago
Closed 4 years ago
Generator and array comprehensions should support destructuring binding
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
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.
Updated•9 years ago
|
Updated•9 years ago
|
Depends on: spread-assignment
Comment 1•8 years ago
|
||
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...
Comment 2•8 years ago
|
||
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]
Comment 3•4 years ago
|
||
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)
Comment 4•4 years ago
|
||
Also, Generator and array comprehensions were removed somewhere in bug 1220564 and bug 1414340
Comment 5•4 years ago
|
||
See comment #4.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
Updated•4 years ago
|
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•