Minor questions on new module BNF

Jason Orendorff jason.orendorff at gmail.com
Tue Jun 4 09:49:28 PDT 2013

On Tue, Jun 4, 2013 at 11:37 AM, Jeff Morrison <lbljeffmo at gmail.com> wrote:

>  I still kinda like the idea of allowing ImportDeclarations to be
> expressed anywhere inside a ScriptElement (including in its children), and
> then hoisting the declaration for compilation/linking, but only executing
> the dependency when the statement is reached at runtime. It is then a parse
> error if an ImportDeclaration is outside of a ScriptElement context.

That sounds nice. But again, why? Is it a performance thing? It seems like
we're saying: yes, eagerly load, parse, and link these modules, but don't
execute them eagerly because that would be too slow. I would expect loading
to be the rate-determining step. What kind of module are we talking about?

The System.get() paradigm is kind of awkward and indistinguishable from the
> import syntax in terms of its expressive relation.
> If its all we can get, so be it -- but it feels pretty unpolished.

Yeah, I don't like the idea of using System.get() for everyday programming
at all. Let's make `import` do whatever it is that's being asked for...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130604/0ee7e85e/attachment.html>

More information about the es-discuss mailing list