In the issues for the proposal people are discussing making most statements
capable of being used as expressions. Then the value of `do` is less
important, but still necessary for some things:
```
const thing = if (cond) { a; } else { b; };
```
Then you only need `do` to introduce a new block scope.
On Jan 18, 2018 05:43, "T.J. Crowder" <[email protected]>
wrote:
> On Thu, Jan 18, 2018 at 12:39 PM, Michael Rosefield <
> [email protected]> wrote:
> >
> > Perhaps we could use `do` in front of any statement to make it
> > treatable as an expression; we could have pure `do`, `do while`
> > (as distinguished from `do-while`...), `do switch`, `do for`....
>
> I believe the proposal does that (or will do if it's fleshed out) and that
> `do { ... }` is just a ramification of that when you use a block with it
> rather than another statement. At least, that's my read of the code shown
> in the Further Considerations and unresolved parsing question.
>
> There's just too much left unsaid so far (in the proposal itself) to be
> sure, though.
>
> -- T.J. Crowder
>
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss