include

John Barton johnjbarton at google.com
Mon Jul 14 17:37:44 PDT 2014


In the module system we issue
   import {foo} from 'foo';
and the Loader computes an address, say foo.js, fetches the resource and
compiles it. If the content of foo.js has no dependencies, it is evaluated,
then the importer is evaluated. Yay!

Now suppose that foo.js defines a global value. Oh bad sure, but sometimes
you have to play cards you are dealt. We still depend upon foo.js, bad or
not bad.

In the current module system we have to abandon ship. In our importer we
need to:
  // WARNING pre-load foo.js somehow!

Now imagine if we could issue
   include 'foo';
and the Loader computes an address, say foo.js,fetches the resource and
compiles it. Since the content has no dependencies, it is evaluated, then
the importer is evaluated. Yay!

On now back to preloading somehow,
jjb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140714/81b62b84/attachment.html>


More information about the es-discuss mailing list