`import` and aliasing bindings
rossberg at google.com
Fri Dec 28 09:12:37 PST 2012
On 28 December 2012 17:54, David Herman <dherman at mozilla.com> wrote:
> Another one is that I've been thinking we should add getter/setter exports
> to make it possible to create lazily initialized exports:
We haven't had the opportunity to discuss that one, but now that you
mention it, I should say that I actually think exports as accessors are a
no-go. Because with that, an innocent plain variable occurrence can
suddenly be an expression with arbitrary side effects, resurrecting one of
the worst features of 'with'. Please don't! If you need lazy
initialization, export a function.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss