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 4:47 PM, Allen Wirfs-Brock <[email protected]>
wrote:

>
> On Oct 19, 2014, at 2:28 PM, Mark Volkmann wrote:
>
> On Sun, Oct 19, 2014 at 4:23 PM, Allen Wirfs-Brock <[email protected]>
> 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. That may lead people to always specify it with 'use
> strict'. I was hoping to not have to do that.
>
>
> It's not intended to be inferred.  In fact, it can't necessarily be
> inferred from the source code of a module or script. The intent is that the
> designation of a source file as containing a module or script unambiguously
> communicated to the ES engine.  It is the manner in which that is
> communicated which is  be implementation or host environment determined.
>
> Allen
>
>
>


-- 
R. Mark Volkmann
Object Computing, Inc.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to