> ```js > function stuff(source, extra) { > const {value, method} = source; > > if (condition) > method.call(source); > > if (value === extra) > source.value = 'no more'; > } > ```
I mean, in this case you can skip destructuring altogether, having a one way and way only of value indirection is a Pretty Good Thing™ (even though we already have proxys, globalThis and other indirection shenanigans), I never felt annoyed of just using `source.value` or `source.method()` instead of `value` and `method()`, again the proposal is just a debatable syntax sugar for something we already can do. I wonder if we could ever do the reference thingy in user-land with variable level decorators, if it ever gets discussed again in the meetings. Would be still kinda fishy to propose and implement
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss