import script --> .esm

John Barton johnjbarton at
Wed Sep 10 13:37:35 PDT 2014

On Wed, Sep 10, 2014 at 10:33 AM, Brendan Eich <brendan at> wrote:

> Matthew Robb wrote:
>> I don't see why they have to? Traceur should be used as a build time tool
>> that ultimately runs in legacy mode. Only REAL modern ES6 module
>> implementations would run in this other world. Basically .es files today
>> would be transpiled into .js files.
> I doubt people will do any such thing. We can have more suffixes (I was
> against .js2 in particular -- that particularly confusing proposal was why
> I unleashed the Nope-topus), but if people can adapt their existing
> practices with AMD/Require/CommonJS modules and use just .js, I bet they
> will.

I was reporting on the problems in practice. I don't believe any of the
problems with module vs script are specific to Traceur.  This is not
equivalent to the AMD/CommonJS problem. The AMD community agreed on a
format and a function call; similarly commonjs. In the ES case, we have one
syntax, import, with two meanings depending on an non-standard string

> Tools will have to read metadata, tea-leaves, and etheric winds to keep
> up. Same as ever.

This discussion is about the import statement and Loader.import(), not

Ultimately TC39 needs to draw a line: what is ES and what belongs
elsewhere. Overall Loader does a good job of drawing that line. But one
area I think it has missed is related to module specifiers, given the
reality that input source comes from individually named locations.  Leaving
this detail of module specifiers undefined just makes ES6 harder to adopt,
its not very hard to fix compared to many complex problems solved already
and I don't see how it has a big downside to fix.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list