const VS features detection

Kevin Smith zenparsing at gmail.com
Wed Jan 8 11:14:53 PST 2014


> If all you want is a non verbose IIFE, use an arrow function. We should
> consider do expressions only if they avoid the TCP violations of strict
> arrow IIFEs.
>

One could say that they are verbose:

    var x = (_=> { /* some statements, with a return statement somewhere */
})();

vs.

    var x = do { /* some statements */ };

I thought this was the main issue that do-expressions address.

However, I like that you brought up "yield".  It seems like we could come
up with some plausible examples which use "yield" in a straightforward way
within a do-expression.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140108/aaebe393/attachment.html>


More information about the es-discuss mailing list