Array comprehension syntax
utatane.tea at gmail.com
Sat Sep 22 09:35:33 PDT 2012
Related issues are here.
On Sun, Sep 23, 2012 at 1:24 AM, Brendan Eich <brendan at mozilla.org> wrote:
> Jason Orendorff wrote:
>> I'm sorry for the confusion here. I didn't mean to propose adding
>> for-each-in to ES6. That would indeed be awful. I just meant that
>> SpiderMonkey cannot necessarily drop this extension. So if the ES6
>> syntax and SpiderMonkey's syntax can't coexist, it will be a problem
>> for us.
> Not to bother es-discuss too much, but in case there's interest:
> I do hope we can retire 'each' from SpiderMonkey at some point. Supporting
> it in comprehensions has a cost. Your example:
> [x for each(x in obj).y of z]
> can't be parsed without error given our current for-each implementation,
> and backtracking and restarting with 'each' not contextually meaningful
> sounds "fun".
> I don't expect a lot of SpiderMonkey- (and Rhino-) specific code will
> break, so making this an error when we support ES6 may be the best way.
> Pull the bandage off quickly!
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss