"use strict"; prepended blindly to scripts in the wild

Brendan Eich brendan at mozilla.com
Thu Sep 9 12:22:40 PDT 2010

On Sep 9, 2010, at 11:57 AM, Dmitry Soshnikov wrote:

> But that exactly I proposed -- to insert into the combined file an /empty statement/ _before_ the first part. 

Right. There's a rule, Dojo follows it IIRC, to prepend ; to all files, always. That will do the trick.

But of course people don't all folllow that rule and nothing enforces it.

Concatenation is never safe when done blindly, but "use strict" ups the ante. The particular problem is that browsers aren't yet checking "use strict", so erroneous content is getting out into the wild.


More information about the es-discuss mailing list