-- Forwarded message --
From: Mark Miller erig...@gmail.com
To: John Barton johnjbar...@google.com
Cc: es-discuss es-discuss@mozilla.org, Erik Arvidsson
erik.arvids...@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 johnjbar...@google.com
wrote:
On Sun, Oct 19, 2014 at 2:23 PM, Allen Wirfs-Brock al...@wirfs-brock.com
wrote:
It is implementation dependent how it is determined whether an
individual file will be parsed as a Script or as a Module.
Axel 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.
You can imagine various ways that modules might be identified in a
command line environment. for example
js script1.js -m mod1.js -m mod2.js script2.js
so of us have argued that a module file extension might be useful in
such environments:
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.
You 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.
jjb
___
es-discuss mailing list
es-discuss@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@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss