Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


All code in modules is in the context of "use strict" by default so it won't be necessary to use this pragma explicitly.


Not entirely sure if browsers require "use strict;", but io.js (node) does.


In iojs/node, you can force v8 strict mode through the --use_strict flag, saving you from writing in every file.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: