Module Execution Order

Kevin Smith zenparsing at gmail.com
Wed Apr 10 08:01:50 PDT 2013


>
> I'm not sure what prior critique you're referring to.


Quite a while ago, I pointed out that concatenation would be difficult with
nested modules, but I was operating under the assumption of interleaved
execution:  https://gist.github.com/zenparsing/3892979


> Also, we no longer plan to include nested modules in ES6.


Yeah, I don't like that.  : )  I tend to agree with Andreas that modules
should have a lexical face.


> Also^2, concatenation should simply require literally concatenating the
> modules, with
> `module "NAME" { ... }` wrappers with appropriate names based on the
> file system (in the common case where development occurs in multiple
> node-style files).
>

But with nested modules (and topological execution order), a tool can
easily create the bundle.  In fact, I think it would be more effective for
a tool to perform that bundling transformation than to do it by hand.

Is there any context or information that would be lost when transforming a
`module "name"` module into a (hypothetical) nested module?  I can't really
think of any at the moment...

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


More information about the es-discuss mailing list