Module Execution Order

Sam Tobin-Hochstadt samth at ccs.neu.edu
Wed Apr 10 07:19:06 PDT 2013


There seems to be some confusion here, because we've chosen the second
alternative.  Can you point to where you got the other impression?

Sam

On Wed, Apr 10, 2013 at 10:06 AM, Kevin Smith <zenparsing at gmail.com> wrote:
> Hi,
>
> I can't seem to remember or find the rationale behind lazy (interleaved)
> execution of external modules.  For example:
>
>     // x.js
>     console.log("inside x");
>     export var x;
>
>     // y.js
>     console.log("inside y");
>     import x from "x.js";
>
> With lazy execution, loading "y.js" would produce:
>
>     > inside y
>     > inside x
>
> The alternative would be to execute dependencies prior to executing the
> requested module:
>
>     > inside x
>     > inside y
>
> What was the rationale for choosing the first alternative?
>
> Thanks!
>
> { Kevin }
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>


More information about the es-discuss mailing list