Module Comments

Nathan Wall nathan.wall at live.com
Fri Dec 7 09:12:13 PST 2012


> Feel free to suggest alternatives, but forgive me if I'm not willing to respond to every opinion on this one. :}
> 

How about:

    import "ga" as ga;

to import the whole module, and

    import "ga" as { foo, bar };

to import just parts of the module. I feel like this makes a lot of sense, and is similar to the destructuring pattern.

    let ga = new Ga();

vs

    let { foo, bar } = new Ga();

Nathan 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121207/b4ec8779/attachment.html>


More information about the es-discuss mailing list