```
const { a } = o;
let { b } = o;
b = 1;
```
seems like a much simpler workaround than adding this complexity to the
language.
Given your two examples, I'd find it bizarre for one to work and the other
not, so we'd want to support both. It also raises the question of
declaration-less assignments - `({ a, b } = o);` could become `({ const a,
let b } = o);`?
On Mon, Jul 3, 2017 at 10:49 AM, Bob Myers <[email protected]> wrote:
> Totally minor, but
>
> ```
> const {a, b} = o;
> b = 1;
> ```
>
> Complains that `b` is `const` and can't be assigned.
>
> ```
> let {a, b} = o;
> b = 1;
> ```
>
> Now lint complains that `a` is never modified, and ought to be `const`.
>
> So I would like to write:
>
> ```
> const {a, let b} = o;
> b = 1;
> ````
>
> or alternatively
>
> ```
> let {const a, b} = o;
> b = 1;
> ````
>
>
>
> _______________________________________________
> 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