Directive prologue members, escapes, and retroactive syntax errors

Brendan Eich brendan at
Sat Oct 16 21:54:01 PDT 2010

On Oct 16, 2010, at 12:36 PM, Peter van der Zee wrote:

> The only question is whether or not an
> error should be thrown due to strict mode. My suggestion was to ignore any
> strict mode rules while parsing string-literal "statements" (not part of a more
> complex expression) at the start of a Program.

ES5 7.8.4 (last paragraph, before the NOTE) seems clear on this, it does not allow your suggestion as an option.

Yeah, we could defy the spec in this odd corner case. Who really cares? Still, if we implementors all do, the spec should be amended when convenient.


More information about the es5-discuss mailing list