As good computer scientists, we know that there are two kinds of OR.
An inclusive OR, which is what we nearly always need in programming, is true if either of its branches is true: “exit this loop if we’ve processed 50 items OR there are none left to process.”
An exclusive OR is true if exactly one if its branches is true, but not if both are. “If player 1 is attacking player 2 OR player 2 is attacking player 1 (but not both) then inflict damage.” [This is a contrived example: that’s because it’s hard to think of non-contrived examples — they hardly ever come up in real programs.]
When we use “or” in informal speech, we nearly always mean exclusive or. If I tell you I’m going to the cinema to see Skyfall on Wednesday or Thursday, you understand that I will go on one day or the other, but not both. If I ask you what you want to drink and you say Abbot Ale or Ruddles County, you’d be surprised (but maybe not disappointed) if I brought you two pints.
Inclusive OR is much less common in informal speech, but it does happen. If Chelsea win the League or the European Cup, then their manager will keep his job. He certainly wouldn’t expect to be sacked for winning both!
Why it is that we overwhelmingly use inclusive OR in programming and exclusive in informal contexts?
It also interests me that we use the same word, “or”, in both contexts: for saying which day we’re going to see Skyfall, and for predicting whether a football manager will keep his job. It feels like this ought to be ambiguous, but in practice it never seems to be.
Can anyone think of an example of a sentence where either kind of OR might be meant?
Are there natural languages in which inclusive OR and exclusive OR are represented by different words? (They are, after all, represented by different operators in programming languages.)