Re: treated as a module if ...

2015-07-12 Thread John Lenz
...@domenic.me wrote: To be explicit: there is no way to look at a string of JavaScript text and tell whether it should be treated as a module or a script. In many instances the same string can be treated as both. The decision is made by the execution environment. I don't think Domenic

Re: treated as a module if ...

2015-07-12 Thread Allen Wirfs-Brock
On Jul 12, 2015, at 2:05 PM, John Lenz wrote: I thought at one time a naming convention was proposed: x.m.js for es6 modules. But I haven't seen any traction for it. various file extension conventions have been floated, but nothing seems to have caught on. Allen

Re: treated as a module if ...

2015-07-06 Thread John Barton
On Sun, Jul 5, 2015 at 8:46 AM, Domenic Denicola d...@domenic.me wrote: To be explicit: there is no way to look at a string of JavaScript text and tell whether it should be treated as a module or a script. In many instances the same string can be treated as both. The decision is made

treated as a module if ...

2015-07-05 Thread Mark Volkmann
Fill in the blank. In ES 2015, a JS source file is treated as a module if _. a. it exports anything b. it imports anything c. both a and b d. something else --- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss

Re: treated as a module if ...

2015-07-05 Thread Mark Volkmann
. On Sun, Jul 5, 2015, 09:03 Mark Volkmann r.mark.volkm...@gmail.com wrote: Fill in the blank. In ES 2015, a JS source file is treated as a module if _. a. it exports anything b. it imports anything c. both a and b d. something else --- R. Mark Volkmann Object Computing, Inc

Re: treated as a module if ...

2015-07-05 Thread Erik Arvidsson
d. If a source file is imported it is parsed using the Module production. On Sun, Jul 5, 2015, 09:03 Mark Volkmann r.mark.volkm...@gmail.com wrote: Fill in the blank. In ES 2015, a JS source file is treated as a module if _. a. it exports anything b. it imports anything c. both a and b

Re: treated as a module if ...

2015-07-05 Thread Erik Arvidsson
provide another hook for the embedder to invoke which allows the source file to be treated as a Module [3]. The idea is that the module loader spec [4] will use this hook. [1] http://ecma-international.org/ecma-262/6.0/#sec-scripts [2] http://ecma-international.org/ecma-262/6.0/#sec-modules [3

RE: treated as a module if ...

2015-07-05 Thread Domenic Denicola
To be explicit: there is no way to look at a string of JavaScript text and tell whether it should be treated as a module or a script. In many instances the same string can be treated as both. The decision is made by the execution environment. ___ es