3 ms·
Remarking on the fact that variables are local by default makes me wonder exactly how many programming languages you're familiar with. That's an extremely low b
by chc 12y ago
Remarking on the fact that variables are local by default makes me wonder exactly how many programming languages you're familiar with. That's an extremely low bar, not really something to love.
- arenaninja 12y agoConversely, 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...
- xyby 12y agoLow bar or not, if you do anything web-facing, there is no way around javascript. And you will do a lot of stuff in a language that makes variables global by default.
- Shish2k 12y agoA car metaphor for this conversation: "I love my skoda! It has four wheels, and a roof, and a passenger seat!" "That's a pretty low bar for things to love about a car. Pretty much all other cars also have those features, and they do them better." "Yeah, well I also ride a bicycle, and my bicycle doesn't have those features."