The getter part is already how it works - you can `export let foo = false;` and then later `foo = true`; and then `export function setFoo(v) { foo = v; }`. Why is the getter/setter syntax a significant improvement over this?
On Thu, Sep 20, 2018 at 4:21 PM, Michael J. Ryan <track...@gmail.com> wrote: > // myFoo.mjs > _hiddenFoo = false; > export get foo() { > return _hiddenFoo; > } > > export set foo(value) { > _hiddenFoo = !!value; > } > > // main.mjs > import {foo} from './myFoo.mjs'; > > Not sure if this has been discussed, but would be a nice feature to have > in some cases... I know, total side effects and mutations, all the same, > would be a nice to have in a few cases. > > -- > Michael J. Ryan > 480-270-4509 > https://www.tracker1.info/ > m...@tracker1.info > track...@gmail.com > > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss