May 24-26 rough meeting notes
Brendan Eich
brendan at mozilla.com
Fri May 27 03:24:25 PDT 2011
On May 27, 2011, at 2:36 AM, Jorge wrote:
> Also, I wonder if in order to make blocks first class, do we need any new syntax ?
>
> function f() {
> a.forEach({ return 3 });
The problem is that a block statement is ambiguous with an object initialiser. See http://wiki.ecmascript.org/doku.php?id=strawman:arrow_function_syntax#grammar_changes in particular the "To enable unparenthesized ObjectLiteral expressions as bodies of arrow functions, without ambiguity with Block bodies, restrict LabelledStatement as follows..." section.
/be
More information about the es-discuss
mailing list