Boolean shortcuts

Brendan Eich brendan at mozilla.com
Wed Jan 4 15:03:22 PST 2012


On Jan 4, 2012, at 2:56 PM, Brendan Eich wrote:

> On Jan 4, 2012, at 1:57 PM, Herby Vojčík wrote:
> 
>> Hi,
>> 
>> as I already posted in the parallel thread, there is that strawman called "do expression" by dherman that does just that.
>> 
>> I feel like crying when I see how powerful data constructs could be if not hampered by "possible to parse as code block" ambiguity.
> 
> Yes, I have felt like crying too -- I did some work (see https://mail.mozilla.org/pipermail/es-discuss/2011-June/015568.html)

I should have also linked:

http://wiki.ecmascript.org/doku.php?id=strawman:block_vs_object_literal

Of course,

http://wiki.ecmascript.org/doku.php?id=strawman:do_expressions

is much simpler.

Neither addresses the empty-block/object issue by trying to evaluate {} as an object literal where today it's a block statement.

/be



More information about the es-discuss mailing list