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

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to