Andrea Giammarchi (2016-09-15T18:45:01.000Z)
> if( let a = ( let b = 10 ) * 3 > 10 )

I've honestly no idea, at first/quick read, what the hell that would
produce.

Is `a` going to be just `true` ? 'cause if not, this proposal violates
operator precedence.

If yes ... why would anyone write that ?

On Thu, Sep 15, 2016 at 7:30 PM, J Decker <d3ck0r at gmail.com> wrote:

> Why not more generally - allow let/var declarations in expressions?
>
> coming from a long and rich C background, I have no issues with the
> existing mechanisms... but for those languages that do support variable
> declarations in for loops; I've always wondered why not any expression?
>
> if( let a = ( let b = 10 ) * 3 > 10 )
> ... or ...
>
> c = (let a = b*d)
>
> granted, the scope is extremely limited in the last case...
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160915/8cabdc39/attachment.html>
forbes at lindesay.co.uk (2016-09-16T09:54:31.213Z)
> ```js
> if( let a = ( let b = 10 ) * 3 > 10 )
> ```

I've honestly no idea, at first/quick read, what the hell that would
produce.

Is `a` going to be just `true` ? 'cause if not, this proposal violates
operator precedence.

If yes ... why would anyone write that ?