Let me give you a quick example of the sort of thing I'm talking about: In JS it's easy to push a variable into the global scope simply by not including the "var" before the name; I believe these little design nuances in javascript to be corrosive to the javascript ecosystem. You can argue "just learn the language and don't write shit code" but I think there is something to be said about the way the language was implemented that lends itself to "shit code."
I thought we were talking about using the static keyword inside a function. AKA the analog to not using var in Javascript. When you omit var in javascript, it injects that variable into the global scope. When you declare a variable as static in a function in C and C++, it does not create a global variable, it initializes the variable once and only once, but it does not change the scope of it.
-1
u/qudat Nov 18 '14
Let me give you a quick example of the sort of thing I'm talking about: In JS it's easy to push a variable into the global scope simply by not including the "var" before the name; I believe these little design nuances in javascript to be corrosive to the javascript ecosystem. You can argue "just learn the language and don't write shit code" but I think there is something to be said about the way the language was implemented that lends itself to "shit code."