The original question was regarding the linearization of the execution order. The question is based on the assumption that require(string literal) is a static declaration of dependency, meaning that it must be loaded before any module executes, but in CommonJS, loading and execution can be performed separately.
In the cited example, the loading is not conditional, but the execution is. I have not personally looked into how Simple Modules determine execution order, but in an async CommonJS implementation, loading may occur in any order as long as all dependencies are available before any module executes in the working set (just like Simple Modules), but execution is lazy and occurs on the stack at the first require function call for that module. I would be interested in reading a few words about the design decisions around linearizing execution order, to the perspective of someone interested in CommonJS who hasn't made a recent study of the modules strawman. Particularly, is this an area where Simple Modules is indifferent and could be altered to be more similar to the current CommonJS execution order semantics? Kris Kowal _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

