> The downside is that it introduces a severe anomaly into the module > semantics (a module which actually has no instance). I could live with > this feature if we were to find a way to explain it in terms of simple > syntactic sugar on both the import and export side, but screwing and > complicating the semantics for minor syntactic convenience is not > something I am particularly fond of. >
What if this: export = "boo"; Actually creates a static export with some exotic name, say __DEFAULT__ (for the sake of argument) and initializes it to the value "boo". And this form: import boo from "boo.js"; Creates a binding to __DEFAULT__ in "boo.js", if it exists, or to the module instance of "boo.js" otherwise. Would that work as a desugaring? - Kevin
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss