Caitlin Potter (2014-12-18T16:50:47.000Z)
d at domenic.me (2015-01-05T20:39:00.418Z)
On Dec 18, 2014, at 10:54 AM, Mark S. Miller <erights at google.com> wrote: > When is this needed? It would be nice for testing (engines and applications), at any rate. If you have similar behaviour for strict and non-strict modes: ``` [true, false].forEach(function someUnitTest(scopeMode) { Reflect.setStrictMode(scopeMode); assertEquals(“quantum puppies”, doTheThing()); }); ``` vs ``` (function someUnitTestStrictMode() { “use strict”; assertEquals(“quantum puppies”, doTheThing()); })(); (function someUnitTestSlappyMode() { assertEquals(“quantum puppies”, doTheThing()); })(); ``` > So another directive like "use nostrict" would be welcome imho. Especially in modules when "strict" is on by default. > > > //... strict context > (1,eval)("...sloppy code..."); > //... strict context eval has other implications, so it doesn’t always accomplish what you want :( Plus, the contents are a lot harder to read in most text editors ;) > Feel free to consider sloppy mode deprecated. I do. Well sure, but unfortunately it’s not going to just disappear :(