domenic at domenicdenicola.com (2014-01-14T17:46:17.446Z)
> 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:
```js
var x = (_=> { /* some statements, with a return statement somewhere */ })();
```
vs.
```js
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.
> 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>