I am a native English speaker and former ESL teacher with a masters degree in applied linguistics, as well as veteran developer.
I am a native English speaker and former ESL teacher with a masters degree in applied linguistics, as well as veteran developer.
Moreover, when you cross over those jargon terms into their regular meaning, hilarity ensues.
For example, you can easily prove that oaks are infinitely tall in winter. Start by observing that in winter, oaks don't have leaves. Then consider the graph-theory definition of "tree" and "leaf".
That's debatable. It's impossible for me to say "if" in any context without thinking about programming now. I can't help it.
When I was a younger programmer (as in, during the first few years), I discovered that assuming boolean / formal logic meanings for {if, or, else, and} in communication with my spouse (art + sales, and very smart, though not a programmer or trained in symbolic logic) resulted in, shall we say ... miscommunication. So I had some unintended help in building the separate registers of meaning / communication. :-)
Building separate meaning registers for communication does take some time.
I cringe every time I hear the and/or thing translated to Spanish, usually several times in a row.
Not sure if it's the usual mistranslation or it's also idiotic in the original text.
But "or" in English doesn't always mean xor in code. Sometimes it is the same as or in code.
There exist languages which lack this ambiguity. Latin has two different words for "or" – "vel" (inclusive) and "aut" (exclusive).
1: do you think it's A or do you think it's not A? 2: yes (assigning a truth value to the or expression rather than indicating which or operand is true.)
"Do you want /pizza or a \burger\?" = XOR
"Do you want /pizza or a /burger/? = OR (as in programming)
It can make a good (though well-worn) joke to answer the XOR version with "Yes."
“Or” in English can mean either exclusive-or or inclusive-or (usually it means the latter), and/or is a means to specify inclusive-or without ambiguity (the parallel construct for exclusive-or is “X or Y, but not both”) used mostly in contexts where misconstruction can be exotics to the drafter of the text, such as contracts and formal policy documents.
In code, the meaning is already unambiguous; in all languages I am aware, “or” or the symbol referred to in speech with that name (e.g., “||”) is strictly inclusive, and do there is an exclusive-or operator, it is different.
But in type system the disjunction concept represents 'either', the concepts are more like how people refer to 'or'.
I can't think of any where that's true; logical “and” and “or” are usually exactly what they claim to be, and many languages implement both as short-circuiting operators, whereas XOR can't short circuit because you can never know the result without considering both arguments.
Programmer's spouse: Honey, go to the shops and buy 1 bottle of milk, if they have eggs buy 6.
Programmer brings home 6 bottles of milk.
Let us be clear that this is US English and not British, but I agree with your sentiment: that the keywords are more a linguistic jargon than anything.
Although the main topic here is about other languages, there are also nuances within the two main streams of English that it's also a little wierd sometimes.
For me, I spell color with a U: ie. colour, but when coding, it's always been the US variant. I've typed this word so much that when I need to type it in my variant, that colour just looks wrong, even though it's the correct spelling in (my area).
Occasionally, when skimming British code, I've come across colour variables and it looks wrong. Similarly, I've looked at French code and there are similar strange things that leak out. The same for Russian and Japanese code I've encountered, eg:
> function <insert_diacritic_or_kanji_here>(char p)...*
The purist in me really wants to state: "everyone should type US English", but the more accepting part of me concedes that maybe keywords should be internationalised (/internationalized) too. Maybe a preprocessor system would suffice (eg somecode.c.jp -> somecode.c), but as you state: it doesn't seem right because of the 'jargon' nature of it.
The good news is that machine code and punch cards have no language, so maybe we could revert to using that and then we can neatly skip over this issue entirely ;-)
So really, this is exactly the same problem human language exists to solve. There's no getting away from it.
Aren't most instruction names are English abbreviations?
Maybe we can internationalize those too. Just to be consistent of course.
I think you're thinking of boring old assembly...? eg (a move instruction):
> MOV EAX,15
Yes you're right about the abbreviated english, but that's why I didn't suggest it as an i18n solution.