Apart from complicating the engine and the grammar - what advantage does the 
second version have over the first one? Why do you prefer it to the first one? 
(Genuinely asking)

I'm also not aware of any other languages that provide this (although that's 
not a huge issue). 

> On Jun 18, 2015, at 05:27, Kyle Simpson <get...@gmail.com> wrote:
> 
> I'd like to ask if there's anyone on TC39 that would be willing to champion a 
> proposal to add the let-block (let-statement) syntax?
> 
> I currently write my block-scoped declarations as:
> 
> ```js
> { let a = 2, b, c;
>   // ..
> }
> ```
> 
> I do this because I want to be in the habit of always putting my `let` 
> declarations at the top of blocks to avoid TDZ hazards. However, Firefox has 
> long had the alternate let-block/statement syntax, which I prefer:
> 
> ```js
> let (a = 2, b, c) {
>   // ..
> }
> ```
> 
> Would there be support to consider such a proposal?
> 
> Side note: I'd also be in favor of a `const (a = 2) { .. }` form, if the 
> symmetry was appealing.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to