(Almost) everything is expression

Axel Rauschmayer axel at rauschma.de
Fri Nov 11 03:45:49 PST 2011


>> IIRC: Block lambdas.
>> 
>> var C = {||   // note the double pipe
>>    let something;
>> 
>>    // |this| is the global object
>>    // ...
>> 
>>    return something;
>> }
>> 
> 
> This contradicts TCP though. E.g. Ruby supports it and there we can't `return` from blocks, since block wrapping should not be treated as a function.

True. My bad. It should work if the return is removed.

Related to the discussion: http://wiki.ecmascript.org/doku.php?id=harmony:completion_reform

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111111/9f3b27f0/attachment-0001.html>


More information about the es-discuss mailing list