3 ms·
Conversely, there's a long list of languages where variables would not be local by default
by arenaninja 12y ago
Conversely, there's a long list of languages where variables would not be local by default
- chc 12y agoInsofar as there is a ridiculously long list of languages nobody has ever heard of, I guess this is true. But it's not true if you're comparing it to languages that are actually used in modern programming. Even if you're considering languages as obscure as, say, Standard ML, you'll still not find many that have a default global scope for variables inside functions. There's pretty much JavaScript, Perl, Fortran and Cobol. I can't think of any others that are even worth mentioning nowadays.
- srgpqt 12y agoLua. At least there is Moonscript to save it...