-- 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
I plan to continue using .js for my modules. This distinction already exists
in Node and AMD code and I've seen no need to differentiate my files.
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
I understand that module code is implicitly in strict mode.
In an ES6 environment, what causes a .js file to be treated as a module?
Does that happen automatically to all files that export at least one thing?
--
R. Mark Volkmann
Object Computing, Inc.
A file that is imported is treated as a module. That's it.
On Oct 19, 2014 1:50 PM, Mark Volkmann r.mark.volkm...@gmail.com wrote:
I understand that module code is implicitly in strict mode.
In an ES6 environment, what causes a .js file to be treated as a module?
Does that happen automatically
It depends on how you access it: if you import the file or load it via
`module` then the file is interpreted as a module.
On Oct 19, 2014, at 19:50 , Mark Volkmann r.mark.volkm...@gmail.com wrote:
I understand that module code is implicitly in strict mode.
In an ES6 environment, what
On Sun, Oct 19, 2014 at 1:59 PM, Erik Arvidsson erik.arvids...@gmail.com
wrote:
A file that is imported is treated as a module. That's it.
And you can statically infer that a file is module by reading the source
and scanning for `export`, which would also mean it's a module. This
wouldn't catch
On Oct 19, 2014, at 1:04 PM, Rick Waldron wrote:
On Sun, Oct 19, 2014 at 1:59 PM, Erik Arvidsson erik.arvids...@gmail.com
wrote:
A file that is imported is treated as a module. That's it.
And you can statically infer that a file is module by reading the source and
scanning for
On Sun, Oct 19, 2014 at 4: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.
This seems problematic because it means I can't assume that strict mode
will be inferred.
On Oct 19, 2014, at 2:28 PM, Mark Volkmann wrote:
On Sun, Oct 19, 2014 at 4: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.
This seems problematic because it
Can we say anything more concrete if we restrict the discussion to modern
browsers as opposed to non-browser ES engines? Is it fair to say that in
those environments a file will always be treated as a module if it is
imported by another file that the browser has loaded?
On Sun, Oct 19, 2014 at
On Oct 19, 2014, at 5:42 PM, Mark Volkmann wrote:
Can we say anything more concrete if we restrict the discussion to modern
browsers as opposed to non-browser ES engines? Is it fair to say that in
those environments a file will always be treated as a module if it is
imported by another
From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Mark
Volkmann
Can we say anything more concrete if we restrict the discussion to modern
browsers as opposed to non-browser ES engines? Is it fair to say that in
those environments a file will always be treated as a module
On Sun, Oct 19, 2014 at 7:48 PM, Domenic Denicola
dome...@domenicdenicola.com wrote:
From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of
Mark Volkmann
Can we say anything more concrete if we restrict the discussion to
modern browsers as opposed to non-browser ES engines?
From: Mark S. Miller [mailto:erig...@google.com]
For all new standard tags, browsers that recognize these tags and browsers
that do not must agree on when the element is done.
This can't be completely true, as `main` and `template` were introduced
recently and definitely don't follow that
On Sun, Oct 19, 2014 at 8:05 PM, Domenic Denicola
dome...@domenicdenicola.com wrote:
From: Mark S. Miller [mailto:erig...@google.com]
For all new standard tags, browsers that recognize these tags and
browsers that do not must agree on when the element is done.
This can't be completely
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
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
it is a module if:
a) it is imported using imperative form thru a loader (with we are still
working out the details)
b) it is imported using declarative form (ImportDeclaration)
c) future module tag, or script type=module (still to figure).
there is an exception for these rules. if you use a
18 matches
Mail list logo