---------- Forwarded message ----------
From: Mark Miller <erights at gmail.com>
To: John Barton <johnjbarton at google.com>
Cc: es-discuss <es-discuss at mozilla.org>, Erik Arvidsson <
erik.arvidsson at gmail.com>
Date: Sun, 19 Oct 2014 21:26:27 -0700
Subject: Re: what makes a file a module?
I agree that we should come to consensus on a file extension. The
argument that "it is out of our jurisdiction" only makes sense to me if it
is in some other group's jurisdiction. AFAICT, it is not. And consensus is
needed, so let's proceed.
Suggestions?
Is there any reason we should still limit ourselves to the traditional
three characters?
Are there any registries reliable enough to get a sense of possible
conflicts, or how bad they may be?
Once we choose an extension, what if anything should be done about
correspondence with mime type?
IIRC, the extension ".jsm" was already proposed, but may have had fatal
conflicts. To get the ball rolling, ".jsmod" ?
Or maybe, less obtrusively, ".m.js" or ".mod.js"? It would still be
possible to tell them apart near instantly, while tooling can still often
rely on the ".js" extension. Syntax highlighters won't really have to
change.
The multiple extension format is already somewhat commonplace, especially
with tarballs. PortableApps.com uses ".paf.exe" to denote their application
installers while still allowing them to be run standalone by Windows.
On Sun, Oct 19, 2014 at 8:43 PM, John Barton <johnjbarton at google.com>
Post by John BartonOn Sun, Oct 19, 2014 at 2:23 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>
Post by Allen Wirfs-BrockIt is implementation dependent how it is determined whether an
individual file will be parsed as a Script or as a Module.
Post by John BartonPost by Allen Wirfs-BrockAxel alluded to a possible HTML extension that could be used to
distinguish modules from scripts. But, exactly how modules will be
integrated into HTML is still under development.
Post by John BartonPost by Allen Wirfs-BrockYou can imagine various ways that modules might be identified in a
command line environment. for example
Post by John BartonPost by Allen Wirfs-Brockjs script1.js -m mod1.js -m mod2.js script2.js
so of us have argued that a module file extension might be useful in
js script1.js mod1.js mod2.js script2.js
FWIW, traceur has to use --script vs --module on the command line and
.module.js among files otherwise parsed as script.
Post by John BartonYou may recall that Yehuda Katz suggested on this group that a prefix
might be used, script:file.js. To avoid long arguments about What Is a URL,
I suggest a postfix string, file.js,script. Of course a file extension
would be better. Many build tools use filenames and this issue puts
practical work with ES6 at a disadvantage.
Post by John Bartonjjb
_______________________________________________
es-discuss mailing list
es-discuss at mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
--
Text by me above is hereby placed in the public domain
Cheers,
--MarkM
_______________________________________________
es-discuss mailing list
es-discuss at mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141020/d615795f/attachment.html>