Would prefer to start strict and stay strict. Sloppy should be seen as an ES3 compatibility mode, nothing more. Would prefer sloppy mode to become an obscure feature that most JS programmers should never even need to be aware of. It should never be the default setting.
-
-
-
I would love to go even further and go module goal by default. Unfortunately, I’m afraid strict/module would break developer expectations: folks want to enter `x = 42` and have it work. Opt-in seems necessary.
- 1 more reply
New conversation -
-
-
It should only persist if you enter "use strict"; all by itself. If your input contains any additional code then it should only be scoped to the execution of that one input.
-
Rationale?
- 1 more reply
New conversation -
-
-
Would prefer a setting.
-
+1, a checkbox
. - 2 more replies
New conversation -
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
How about we just have a toggle-able option in the dev tools console? Not sure I want to be typing ’use strict’
-
Yes! Trouble is, this won't work for REPLs such as Node REPL where there aren't any toggleable buttons :/
- 2 more replies
New conversation -
-
-
Unsure. If I paste 2 snippets, one strict, one not, reasonable people could disagree. If I want strict, I'll wrap in (function(){"use strict"; ... }()); which complicates global decls, but I'll deal. Worst would be "use strict" in a REPL silently evaluates to a mere string.
-
Yeah... Should be some kind of setting on the DevTools controls bar that affect global and local lexical contexts irrespective when set. Not by just using the declaration.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.