| Could you expand on how it could hurt you? All I was able to find was this [0] > I found two opinions about using strict mode in production: > > There is no reason to ship “use strict” in your production code. There is no performance gain (verified with V8 team and Brendan a while ago) and I don’t need my users’ VMs doing the extra checks as well. Keep it development only, strip it out during build. This way you also avoid the concatenation issue you reference. > And: > > There may not be a performance gain, but there’s also not a performance loss. In production, even more than in development, is where you want to be sure you’re noticing errors. Minimizing the changes between the development and production versions of the code is key to being able to debug issues quickly and efficiently. Yes it helps during development, but there’s no reason to pull it out of production code. > The source is in the comments at the bottom [1] > And of course those 12b weight of "use strict" won't change a thing. [0] http://stackoverflow.com/a/10986793/1072106 [1] http://www.nczonline.net/blog/2012/03/13/its-time-to-start-u... |
There have also been breakage issues. "use strict" changes semantics. Before all browsers implemented "use strict", some had it and some didn't, which meant scripts with "use strict" ran differently in different browsers.