It sounds like you'd like to have the `with` statement back.

On Mon, Mar 19, 2018 at 8:47 PM, Sebastian Malton <[email protected]>
wrote:

> a reference to the data which it has been assigned to but modifies also
> the original reference when modified.
>

```js
const obj = {field: {name: {fullname: 'before'}}};

with (obj.field.name) {
  console.log(fullname);
  fullname = 'after';
}

console.log(obj.field.name.fullname);
```

Combined `with(aProxy)` that pattern was able to do so much magic !!! ...
although I'm not sure it's a good idea to re-introduce it through
self-contained references.

Regards
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to