Module literal name

Kevin Smith zenparsing at gmail.com
Tue Jun 25 06:34:21 PDT 2013


>
>
>
> **
>
> import “classes/foo”; // use default namespace****
>
> new foo.bar();****
>
> ** **
>
> module ns from “classes/foo” ; // alternative namespace****
>
> new ns.bar();****
>
> **
>

How is the first example any better than the second?  The first is far more
difficult to statically analyze, since any identifier could potentially be
a "namespace".

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


More information about the es-discuss mailing list