Array comprehension syntax
Yusuke Suzuki
utatane.tea at gmail.com
Sat Sep 22 09:35:33 PDT 2012
Related issues are here.
https://bugzilla.mozilla.org/show_bug.cgi?id=791343
https://bugzilla.mozilla.org/show_bug.cgi?id=791348
https://bugzilla.mozilla.org/show_bug.cgi?id=791352
Regards,
Yusuke Suzuki
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!
>
> /be
>
> ______________________________**_________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120923/ca4ad803/attachment.html>
More information about the es-discuss
mailing list