statements that could be expressions?

Brendan Eich brendan at mozilla.com
Fri Jun 3 18:54:45 PDT 2011


On Jun 3, 2011, at 4:04 PM, Brendan Eich wrote:

> On Jun 3, 2011, at 3:11 PM, Waldemar Horwat wrote:
> 
>> Don't you also want to allow (either now or in the future) for the shorthand {x, y} to mean {x:x, y:y}?  There are also getters, setters, and various other stuff that can be put into object initializers now or in the future, so there are more possibilities than just an identifier followed by a colon.
> 
> True, and {x, y} is noted somewhere (or was in a past version) as a problem. http://wiki.ecmascript.org/doku.php?id=strawman:object_initialiser_shorthand did not get promoted yet, and I forgot to keep this pot boiling.
> 
> The accessors are not ambiguous, but the proposed !, ~, and # property prefixes for writable, enumerable, and configurable false-setting do make trouble.

I updated http://wiki.ecmascript.org/doku.php?id=strawman:arrow_function_syntax to restrict lookahead(2) ∉ { Identifier ":", "get" Identifier, "set" Identifier }] StatementList.

/be

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110603/20b83cb3/attachment.html>


More information about the es-discuss mailing list