Hopefully last word on Use Strict Directive syntax

Allen Wirfs-Brock Allen.Wirfs-Brock at microsoft.com
Tue Jun 9 16:28:07 PDT 2009

>-----Original Message-----
>From: es5-discuss-bounces at mozilla.org [mailto:es5-discuss-
>bounces at mozilla.org] On Behalf Of David-Sarah Hopwood
>>> If you get into the habit of
>>> omitting semicolons, you can also run into trouble with things that
>>> like they're strict but are not:
>>> function f(x) {
>>>  "use strict"
>>>  +x ? delete p : delete q;
>>> }
>This hazard, OTOH, can't be fixed, because the "use strict" is not a
>directive in this case, and you would have to know that it is a
>before you could require a semicolon after it.

This seems like a strong argument for not trying to forbid semicolon insertion in the Directive Prologue. 

My current thinking is that we shouldn't try to outlaw it in the Directive Prologue.


More information about the es5-discuss mailing list