John Lenz (2014-01-24T17:26:57.000Z)
On Fri, Jan 24, 2014 at 9:16 AM, John Barton <johnjbarton at google.com> wrote:

>
>
>
> On Fri, Jan 24, 2014 at 8:49 AM, Tab Atkins Jr. <jackalmage at gmail.com>wrote:
>
>> On Fri, Jan 24, 2014 at 8:48 AM, John Lenz <concavelenz at gmail.com> wrote:
>> > For static language parsers there seems to be a bit of a dilemma with
>> ES6
>> > modules.  I would appreciate a correct or hint.
>> >
>> > Here is my understanding:
>> >
>> >   - standard scripts as we know them today will parse in the browser as
>> > "loose" code
>> >   - scripts with the standard "use strict" will parse as "strict" with
>> > access to all ES6 goodness
>>
>> Loose code will also get all the ES6 goodness.  1JS and all that.
>>
>
> You can't use import or export (or module?) keywords in script. There are
> two parsing goals, one for script and one for module.  So more like 2JS ;-)
>

You can't import from a script?  How do you load the first module?  That
seemed like the natural migration strategy.


> REPL is a dilemma: if you parse as module, then obtaining the last
> expression value is not simple. if you parse as a script, then common
> cut/paste fails on export/import statements.
>

My basic question remains.  As a tool owner how do I know if what I'm
looking at is intended to be a Module or a Script?


>
>> ~TJ
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140124/7dd96e0b/attachment.html>
domenic at domenicdenicola.com (2014-01-31T16:33:20.819Z)
On Fri, Jan 24, 2014 at 9:16 AM, John Barton <johnjbarton at google.com> wrote:

> You can't use import or export (or module?) keywords in script. There are
> two parsing goals, one for script and one for module.  So more like 2JS ;-)

You can't import from a script?  How do you load the first module?  That
seemed like the natural migration strategy.


> REPL is a dilemma: if you parse as module, then obtaining the last
> expression value is not simple. if you parse as a script, then common
> cut/paste fails on export/import statements.

My basic question remains.  As a tool owner how do I know if what I'm
looking at is intended to be a Module or a Script?