Kevin Smith wrote:
Indeed, it goes against Dave's original proposal that module opt
into strict mode, which avoids some problems with sloppy mode in
modules, e.g. implicitly created globals by assignment to free names.
Does this mean any script loaded as a module?
import something from "x.js";
So "x.js" would be strict mode code, even if it doesn't start with
"use strict;"?
I finally did what I have done before, and should have done again:
re-read Dave's o.p. on what became known as "1JS":
https://mail.mozilla.org/pipermail/es-discuss/2011-December/019112.html
It does not even contain the word "strict". IIRC (and I asked about this
at the last TC39 meeting and got verbal confirmation), the idea of
module {...} implying strict mode was latent, or intended. I'm not sure
about out of line modules.
At this point, best thing is to summon Dave.
For myself, I'll note that like any good meme or brand, "1JS" has
fluctuating meaning. It needs to be specified, for sure. It is somewhat
protean but not (yet) full of contradictions or conflicts. This is a
good thing (see my marketing joke). As we firm it up, we can afford to
lose implicit assumptions (e.g., module implies strict) that make things
simpler, as you propose. But we shouldn't throw out the name or the
underlying fuzzy concept.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss