So (as was clarified at the meeting) the Caja work is quite informative, but we are not looking at any Harmony module system that requires ahead-of-time code analysis and transformation before code reaches the browser.

The alternative for Harmony is a syntactic special form, an import directive for example, that can be analyzed when the program is parsed (not executed), so the implementation can preload all dependencies before execution to avoid blocking on an import (or a later data dependency), or else an awkward non-blocking import to preserve JS's run-to-completion execution model.

Async (non-blocking) import functionality (a runtime API) is good too but it should not be the only way, or the common way.

There's more to say about modules but I'll let others speak up.

/be

On Nov 7, 2009, at 9:03 AM, ihab.a...@gmail.com wrote:

On Sat, Nov 7, 2009 at 8:34 AM, Ash Berlin <ash...@firemirror.com> wrote:
Slide 10 says "Sync, arg must be a string literal". 1) why a string
*literal*, ...

It's the simplest form of statically determinable identifier. We could
say, "arg must be an expression that statically evaluates to a
string", like:

 'f' + 'oo'

but we chose the simplest interpretation.

Essentially, we are making 'load' a special form.

... and 2) how can that be enforced?

The Caja system is a compiler. :)

Ihab

--
Ihab A.B. Awad, Palo Alto, CA
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to