-
Notifications
You must be signed in to change notification settings - Fork 7.3k
deprecate --use_strict #7479
Comments
I don't know if any application may need that but for example
|
I'd love to see it implemented. I just found about 50 issues on github where people try to use Not to mention that |
@rlidwka |
this is a v8 feature isn't it? to date, does node block/remove any v8 features? |
@mikeal Perhaps we can push this upstream to v8 then? It's a bad idea no matter where it lives. I just want to see it die. |
@substack I nominate @domenic to that task :P |
👍 on removal. Having a StrictScript weird javascript mode is annoying. |
This is indeed a problem to be handled upstream of Node, thanks for your interest though |
--use_strict is a very nice option, it makes code easier to debug and safer at runtime. Unfortunately the fact that it is incompatible with the debugger prevent from enforcing it at a global level. Hopefully this will be fixed future version of nodejs. But I would vote for --use_strict to be the default mode and to have --not_strict for legacy code. |
@domenic is there a corresponding v8 bug that we can references? |
I think V8 uses it for testing and doesn't plan to remove it. Maybe we can lobby to get it renamed to e.g. |
My suggestion would be: On V8 side: rename it to On node.js side: introduce PS: maybe prefix all v8 options with |
Unfortunately it looks like V8 is not willing to change the name (or remove the option). I still think we should blacklist it on the Node side. |
+1 for |
Any modern interest in blacklisting this flag on the node side? |
@ljharb Perhaps this should be discussed at nodejs/node instead? |
@ChALkeR thanks, done nodejs/node#6429 |
This feature is antithetical to modularity because if any module in your dependency graph uses an octal literal or other sensible features your code will refuse to work and angry people will swarm on your issues thread demanding purely subjective style fixes. If people want strict more in their own code,
"use strict";
is entirely sufficient.In the words of @domenic:
The text was updated successfully, but these errors were encountered: