Nannying (was: Array comprehension syntax)

Brendan Eich brendan at
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 /*}*

and later revisions at

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.


More information about the es-discuss mailing list