Question: does requiring strict mode for changes that break compatibility
with ES5 really address the 1JS concerns? We're making usages of the
identifier let that were valid in ES5 strict invalid in ES6 strict. Doesn't
that violate 1JS?


On Sun, Nov 18, 2012 at 7:02 AM, Kevin Smith <khs4...@gmail.com> wrote:

>
>
> Dave Herman proposed as part of 1JS that module imply strict mode, so let
>> is reserved in module. So that helps.
>>
>
> Sure, for inline modules.  But are externally loaded modules strict as
> well?  I think they should be...
>
> 1. 'let' only in strict code including modules per 1JS as originally
>> proposed.
>>
>> 2. 'let' followed by identifier or { but not LineTerminator.
>>
>> 3. 'let' followed by identifier or { with LineTerminator and other space
>> allowed in between.
>>
>> 4. 'let' followed by identifier, {,  or [ and LineTerminator in between
>> is ok.
>>
>> 5. We could also allow 'let' per (4) in functions not in modules that do
>> not "use strict" but do use new ES6 syntax in their heads, e.g.
>> destructuring parameters, default parameters, rest parameters. Those head
>> features could arguably opt into 'let' syntax but not strict mode.
>>
>
> Anything other than (1) neuters either the let statement or let
> identifiers - yuck.  As Domenic says, most new code will go in modules
> anyway.
>
> - Kevin
>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>


-- 
Yehuda Katz
(ph) 718.877.1325
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to