-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 

On 11/5/2010 12:58 PM, Brendan Eich wrote:
> [snip]
> The declarative syntax, as I pointed out earlier in this thread, is
used to prefetch, so there is no violation of JS's run-to-completion model.
>
> What you seem to be thinking, in your module myApp example, is that
everything in between the nested module Template, module NewShiny, etc.
lines is either run before those modules load (so cannot use anything
loaded, so violates the JS execution model), or is automatically
transformed into callbacks or even threaded, so that one could call
OldModule.foo(); right after the module OldModule = ... line (btw, the
"load" pseudo-keyword is being dropped), and not get a reference error.
>
> But Harmony module syntax exists precisely to preserve the step at a
time, no hidden threading or CPS'ing or event loop nesting, execution
model, by enabling prefetching of static dependencies.
>
> Dynamic dependencies require use of the module loader API, as Sam said.
The static module declarations use the default module loader under the
hood, but ahead of execution of the script that contains those module
declarations. The script is parsed and the modules prefetched before
execution starts.

The prefetching is not performed by the default module loader provided
by the host? Can't that default module loader be overriden? When you
use a custom module loader why isn't arbitrary code executed when the
JS VM requests a module needed by the loading module?

- -- 
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/
 
iEYEARECAAYFAkzUVkkACgkQ9VpNnHc4zAxkxQCeM5mIrcgpa1jvF2figilZI/zT
RmIAn22y0f2ARJspYFRPffy8nW4Zl4C7
=a4xO
-----END PGP SIGNATURE-----

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to