10 ms·
There are only a few reserved (English) words, most of which are shared among different programming languages. Why is this any more of an issue than all the I
by DonaldFisk 7y ago
There are only a few reserved (English) words, most of which are shared among different programming languages. Why is this any more of an issue than all the Italian words used in musical notation?
- ajross 7y agoIt's not, it's just fun to think about. Likewise french dominance of culinary terms, etc.. What I find more interesting is actually how removed from spoken English most programming language reserved words are. Taking C and derivatives: "if" is pretty close, and "while" captures the meaning of the word but not its typical usage. The meaning of "return" is correct, but jargon (yes, you're "going back" to where you were called from, but that's not what people mean when they use the word normally). But from there it gets weird fast: "else" reflects a somewhat odd sense of the word that sounds archaic and stilted in human communication; "for" and "break" have little to no connection to spoken language at all. As far as type names: "int" makes sense if you took high school math, and "char" abbreviates a real word that no one uses ("letter" is the one we get taught in school). But no amount of literacy is going to tell you what "short", "long", "double" or (weirdest of all) "float" mean, those are all terms of art you need to learn from scratch regardless of what language you speak.
- umanwizard 7y ago"int" doesn't really make sense from a mathematical perspective, since ints in e.g. C are a finite set that is not closed under addition or multiplication. So I think it's actually a good example of your broader point, that the meaning of English words as programming keywords is often very different from their meaning in other contexts.
- ajross 7y ago> finite set that is not closed under The discussion was about programming languages and English. What on earth is this about? You're actually compounding the issue here, by invoking jargon from a different field. That's true of the definition of integers you'll find in college level math textbooks, but the word "integer" as understood by normal people (even computer programmers) means "whole number", which is why the type is named that way.
- umanwizard 7y agoMy point was that 10^1000000000 is a valid integer according to the high school (or college) definition, but not in most implementations of c++.