names [Was: Approach of new Object methods in ES5]

Peter van der Zee ecma at
Mon Apr 19 23:13:18 PDT 2010

On Mon, Apr 19, 2010 at 11:25 PM, Brendan Eich <brendan at> wrote:

> On Apr 19, 2010, at 4:27 PM, Peter van der Zee wrote:
>  ES5 introduced the concept of directives, using perfectly fine fallback
>> with no side effects. This was, as far as the above goes, perfect. Older
>> implementations couldn't possibly trip over it since a string literal
>> without anything else has no visible side effects.
> I should point out again that "use strict"; changes runtime semantics
> involving eval and arguments in ES5, it does not merely prevent programs
> from getting to runtime (i.e., it is not just stricter syntax, e.g.
> forbidding 'with').
> This means that if you "use strict" you have to test your code in pre-ES5
> and ES5-or-above implementations, to be sure you're not counting on the ES5
> changes.
> Usually you won't have a problem, but testing is the only way to be sure,
> if you are using eval and/or arguments in your strict code.
Correct me if I'm wrong but in the case of "use strict", doesn't that only
apply restrictions? So as far as the difference between "use strict" and no
strict are concerned, if a script works in strict mode shouldn't it also
work in no strict? I can't recall any parts of the spec that include
backwards incompatible extensions for that directive.

Of course for new syntax or using future reserved keywords or whatever,
you're absolutely correct.

- peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list