J Decker (2016-09-15T18:30:13.000Z)
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...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160915/7bb2c3ec/attachment.html>
forbes at lindesay.co.uk (2016-09-16T09:54:10.793Z)
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?

```js
if( let a = ( let b = 10 ) * 3 > 10 )
```

... or ...

```js
c = (let a = b*d)
```

granted, the scope is extremely limited in the last case...