Modules, Concatenation, and Better Solutions

Kevin Smith khs4473 at
Tue Oct 16 06:21:53 PDT 2012

> Just to be sure... Does a get printed only the first time the module A is
> imported somewhere, or every time?

Only the first time.  But the question here is about nested/inline modules.

Patrick, it must be the other way.  Here's why:

    module A {
        export function f() { console.log("A"); }


No import required before usage of an inline module.  There is a
concatenation strategy which will preserve order-of-execution, but but
without some scope artifacts:

I'm not saying this is a problem with the current design - just that it
complicates the concatenation story.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list