Why you don't *want* to? I didn't force you to like my proposal. I am just
posting my ideas for feedback, not see who wants and doesn't want to like it.
________________________________
From: es-discuss <[email protected]> on behalf of Bergi
<[email protected]>
Sent: Sunday, November 3, 2019 3:17:11 PM
To: [email protected] <[email protected]>
Subject: Re: Optional Curly Braces in JavaScript
Hi Ed!
> Update to the proposal:
>
> Since we can't make spaces in JavaScript, the best we can do is use '_'
> instead.
You misunderstood. We *could* make use of significant whitespace in
JavaScript (enabled by the `:` instead of a brace after a statement) -
we just don't *want* to.
That said, `_` is not a workable solution - apart from _ (and any
repetitions of it) being a valid identifier already, *chaining* it like
you described doesn't work with nested blocks:
```
for (const x of [1,2,3])
_ if (x % 2)
_ console.log('odd')
_ console.log(x)
```
would be indistinguishable from
```
for (const x of [1,2,3])
_ if (x % 2)
_ console.log('odd')
_ console.log(x)
```
(and no, please don't suggest repetion of whatever token you come up
with for signifying nesting level)
kind regards,
Bergi
_______________________________________________
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