Nannying (was: Array comprehension syntax)
Brendan Eich
brendan at mozilla.org
Mon Sep 24 19:57:55 PDT 2012
Allen Wirfs-Brock wrote:
> I agree that this is a real hazard. I think eliminating it requires
> two token look-ahead. If that is ok, then we could specify
>
> /ConciseBody /*:*
>
> [lookahead ∉ { *{*}]/AssignmentExpression
> /*{*[lookahead ∉ { /IdentifierName/}] [lookahead ∉ { *:*}]
> /FunctionBody /*}*
>
See
http://wiki.ecmascript.org/doku.php?id=strawman:arrow_function_syntax&rev=1307152413
and later revisions at
http://wiki.ecmascript.org/doku.php?do=revisions&id=strawman%3Aarrow_function_syntax
These lookahead(2) restrictions I drafted in the strawman stage of arrow
function syntax are not enough if we keep extending object literals. But
perhaps we should stop extending object literals.
/be
More information about the es-discuss
mailing list