revive let blocks

Kyle Simpson getify at gmail.com
Thu Jun 18 02:27:30 UTC 2015


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.


More information about the es-discuss mailing list