On 16 April 2013 12:15, David Bruant <[email protected]> wrote:
> Le 16/04/2013 11:54, Andreas Rossberg a écrit :
>
>> On 16 April 2013 11:12, David Bruant <[email protected]> wrote:
>>>
>>> TC39 (which I'm not part of) agreed to not add more modes to ECMAScript.
>>> They try to follow the "1JS" rule, that is there is only one language.
>>> Among
>>> other things, this makes writing parsers and interpreters easier.
>>
>> It doesn't. Quite the opposite, in fact.
>
> Oh, sorry about the misinformation, then :-s
> Could you elaborate, please? I'm interesting in understanding how more modes
> is easier from an implementor perspective. Or/and why less mode makes things
> harder.

Every new feature may potentially need to do slightly different things
in different modes. The semantic matrix of supporting all features in
all modes can then easily be more complex than just adding the new
features to a subset of the modes. It depends how difficult the
interaction between new features and legacy modes is on average. For
example, certain ES6 features interact rather badly with non-strict
mode and/or web reality (e.g., block-scoped functions). Not supporting
them there would have simplified matters.

/Andreas
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to