ES Modules: suggestions for improvement
khs4473 at gmail.com
Thu Jun 28 08:25:41 PDT 2012
> What James asked for was a solution for how libraries such as jquery
> or backbone could be implemented so that they work in both worlds,
> which is what I provided.
>From James' point-of-view, though (correct me if I'm wrong, James), this
would be a step backward from current AMD usability.
No, it doesn't. It's important to distinguish between the code that
> runs to set up an environment (such as the call to `System.set` in my
> mail) and code that runs *in* that environment (such as the `import`
> statement in my mail). What is runtime for one of these is
> compilation time for the other.
I see your point. If "add_blaster.js" does not export "go", then we get an
early binding error when we compile the main module.
That's fine for the execution environment, but static analysis tools that
do not execute code will not be able to tell what the exports are for a
given module URL, in general. This point has a bearing on the "IDE"
argument, I think.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss