`import` and aliasing bindings

Andreas Rossberg 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.

/Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121228/d1f561d6/attachment-0001.html>


More information about the es-discuss mailing list