const VS features detection

Allen Wirfs-Brock allen at
Wed Jan 8 09:04:58 PST 2014

On Jan 8, 2014, at 8:32 AM, Mark S. Miller wrote:

> If all we want is sugar for IIFEs, I wouldn't bother. With arrow functions, IIFEs are already a lot shorter. The extra brevity of do expressions is not worth it.
> What would make do expressions worthy of consideration is if they repaired the TCP violations of strict arrow IIFEs, including var, arguments, break, continue, return, and especially yield.


You should be able to put a 'do' in front of any BlockStatement and turn it into an ExpressionStatement.

I don't think we should have a new expression level scoping construct that doesn't have the exact semantics of a Block.


More information about the es-discuss mailing list