Closed Bug 562146 Opened 15 years ago Closed 9 years ago

Add native 'while' operator in javascript Generator expressions (feature request)

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
minor

Tracking

()

RESOLVED WONTFIX

People

(Reporter: dimsal.public, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) Build Identifier: Consider this: let source = (value for(value in I) while(value != stop)); versus the verbose klutz minimally required for the same effect in 1.8: let source = (value for(value in I) if(value != stop || function(){throw StopIteration}())); While native Generator expressions (GE's) in JS1.8 provide additional expressive power over other iteration techniques and, potentially, more resource economy over array comprehensions, I feel that both of these benefits are somewhat compromised by the absence of a built-in, concise control syntax allowing GE's to abort. I think that a native while operator proposed above would be a valuable addition to GE's. Reproducible: Always Steps to Reproduce: Nada. Feature not available (yet - hopefully).
Assignee: general → nobody
JS1.8 generator comprehension were removed in bug 1220564, resolving as Won't Fix.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.