-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 11/5/2010 12:31 PM, Sam Tobin-Hochstadt wrote: > On Fri, Nov 5, 2010 at 2:25 PM, Kris Zyp <[email protected]> wrote: >> >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >> >> Another idea that might provide the extensibility to deal with >> loading various resources and alternate/older modules, what if we >> added the ability to specify the loader to use for a module: > > This is of course possible with a module loader, and these are > interesting and valuable use cases. Right, but how does a module express a dependence on a particular module loader? The problem is that it requires knowledge of what module loader is needed, and this must be manually loaded before hand, which is problem that modules is supposed to solve. >> module myApp { module Template = load "template.html" with >> "text-loader.js"; // load a template text module Messages = load >> "messages.json" with "i18n.js"; // load some messages module >> OldModule = load "old-module.js" with "commonjs-loader.js"; >> module NewShiny = load "a-harmony-module.js"; // use the default >> native harmony module loader ... > > But I don't think using the declarative syntax for this is a good > idea - there's no static scope here; instead, there's arbitrary > code execution and evaluation. Additionally, this makes > everything synchronous. Doesn't the default module loader get executed normally? Why do alternate module loaders change that? Why does it have to be synchronous, the module loader API is asynchronous? - -- Kris Zyp SitePen (503) 806-1841 http://sitepen.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzUUVYACgkQ9VpNnHc4zAzz8wCgk1Jkt/fDwgSJwgJgXOOZZuzr g0AAmQHmZbO0ywFmryUcoiyESLIS50Cd =CnPI -----END PGP SIGNATURE-----
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

