`import` and aliasing bindings

Kevin Smith khs4473 at gmail.com
Fri Dec 28 09:06:29 PST 2012

> So I fully agree with all of Andreas's points. Another one is that I've
> been thinking we should add getter/setter exports to make it possible to
> create lazily initialized exports:
>     let cell;
>     export get foo() {
>         if (!cell)
>             cell = initialize();
>         return cell.value;
>     }

Don't like it.  This is tacking on features to a part of the language that
should be nearly featureless.  There are plenty of abstraction mechanism to
accomodate lazy initialization already (one could export a class which has
a static getter, for example).

{ Kevin }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121228/e737177c/attachment.html>

More information about the es-discuss mailing list