Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
thwarted
· 11y ago · 0 comments
Why can all this new syntax be added, but the "use strict" pragma is still specified by a string? It made sense to send messages to the interpreter in a backwards compatible way, but now it just seems odd.
Comments
[–]
v413
11y ago
All code in modules is in the context of "use strict" by default so it won't be necessary to use this pragma explicitly.
[–]
nodesocket
11y ago
Not entirely sure if browsers require "use strict;", but io.js (node) does.
[–]
silverwind
11y ago
In iojs/node, you can force v8 strict mode through the --use_strict flag, saving you from writing in every file.