6 ms·
Great observations. In the same idea, "or" is inclusive in all of programming and CS, i.e. A and B => A or B, but in natural languages (as least the ones I know
by fouronnes3 6y ago
Great observations. In the same idea, "or" is inclusive in all of programming and CS, i.e. A and B => A or B, but in natural languages (as least the ones I know) "or" is almost always exclusive, i.e "do you want to eat pizza or pasta?" does not imply that eating both is an option.
This is of course related to why the famous joke "Is it a boy or a girl? Yes." is so hilarious.
- gpderetta 6y agoLatin has both in inclusive ('vel') and exclusive ('aut') or.
- cgriswald 6y ago> "or" is almost always exclusive, i.e "do you want to eat pizza or pasta?" does not imply that eating both is an option. English is way too ambiguous for this example and often relies heavily on context. Wanting to eat pizza does not preclude also wanting to eat pasta. If it was exclusive or, and you wanted to eat both pizza and pasta, the honest answer to this question would be "no," but what you should say is "yes."
- rvense 6y agoI'd say all languages work like that, not just English. Your phrasing "too ambiguous" is a little off to me. Ambiguity (in the sense of utterances having multiple possible interpretations) is the norm in natural language, and it combines with our ability to effortlessly pick the intended one based on context to make natural language work. Even sentences that on their face are strictly propositional will, in actual situated language use, have implied meanings (a pragmatic level). The canonical example is where one person says "It's cold" (at it's core a statement of fact), after which another person closes a window, or hands them a jacket, or follows with "Let's go home, then". If you want to give an account of natural language meaning that's even remotely complete, you cannot stop at what's in the sentence at the surface, you absolutely have to look at why it's being said. Indeed, if you think of an actual situation where someone would say "do you want to eat pizza or pasta?", I think you'd find that it does, in fact, imply that the two are exclusive in that context - say if you're at a restaurant where they only expect you to order one main course. But this is not a problem at all, it's just how language works. (And personally, on the subject of logic and language, I'd even go as far as to say that logic is based on natural language rather than the other way around, but I think that might be tough sell to the mathematically minded.)
- cgriswald 6y ago>> Indeed, if you think of an actual situation where someone would say "do you want to eat pizza or pasta?", I think you'd find that it does, in fact, imply that the two are exclusive in that context It was actually this specific question that made it clear to me that this is not the case. In order to narrow down our takeout options, the girlfriend and I regularly ask questions like, "Do you want pizza or pasta?" meaning "Are any or all of these meal options acceptable to you?" (at which point the conversation continues with maybe us listing a few restaurants which offering one or both options.) This is the same exact phrase, but from context it is inclusive or. >> - say if you're at a restaurant where they only expect you to order one main course. Indeed, if the question was something like "Would you like soup or salad?" where, from context, the choice is binary and exclusive.
- u801e 6y agoOne way to make the or inclusive is to use the construct and/or.
- hutzlibu 6y ago"This is of course related to why the famous joke "Is it a boy or a girl? Yes." is so hilarious" Only to IT people though. Common folks will just look at you in a weird way...
- still_grokking 6y agoExcept the folks are mathematicians. But in this case there is actually a slight chance that nobody recognizes this as a joke at all...
- hutzlibu 6y agoI knew that someone would point that out.. But I figured most mathematicians are IT people, too. But there is at least also a third group: philisophers. They have formal logic, too (in university), but seldom math. So in the spirit of the joke: "Only to IT people though. " Would have to be: "Only to IT people and/or math people and/or philosophers, though. " Desire for formal correctness satisfied?
- potiuper 6y agoWhat is wrong with a yes response to "do you want to eat pizza or pasta?" with yes implying that one would be willing to eat either rather than requiring an exclusive preference that could be asked with "either" before pizza? Similarly with the boy or girl question, "no" may be stillborn.
- combatentropy 6y ago> What is wrong with a yes response to "do you want to eat pizza or pasta?" It doesn't answer the question. The questioner is asking for your help in making a decision. If you are completely neutral about the two, then most people answer with the phrase, "Either one is fine". Saying just "yes" sounds like you misunderstood the question --- unless you say it with a wry smile, showing that you mean to be funny in your answer. (I suppose occasionally someone could ask the question with a different inflection, with the last word at a higher pitch, meaning, "Are either of these fine with you?" rather than, "Please pick one.") > Similarly with the boy or girl question, "no" may be stillborn. The sex is set at conception.
- deleted 6y ago[deleted]
- tsimionescu 6y agoCompletely off topic, but this is a pet peeve of mine: > > Similarly with the boy or girl question, "no" may be stillborn. > The sex is set at conception. Not necessarily - at conception, the cells could be XX, XY, but also XXY (not to mention, they could be X- or -Y). After conception, chymerism could occur, where XX and XY twins become conjoined and a single fetus develops having both XX and XY chromosomes in different parts of the body - the sex will mostly be determined by which DNA is used when forming the gonads. It could also end up developing both kinds of gonads. But even if the fetus develops testicles, there is a chance that it has some kind of testosterone resistance and ends up with a completely female phenotype. Of course, there is also a possibility that no gonads are developed. This is all staying well in the realm of biological sex, and disregarding other hormonal complications that could happen based on what the mother is doing and her health, and disregarding any morphological abnormalities that could cause surface-level confusion between biologically male and female sexual organs.
- MaxBarraclough 6y agoTo make things even worse, we sometimes capitalise these words to emphasise that we're using them in a technical sense, but OR reads as if it's emphasising that it's an exclusive 'or'. You can have tea OR coffee is clearly emphasising that it's an XOR operation. Somewhat related: the Ada language uses and, or, xor for its logical operators, but uses and then and or else for the short-circuit forms. [0] Not a very natural solution in my opinion. [0] https://en.wikibooks.org/wiki/Ada_Programming/Operators#Short-circuit_control_forms https://en.wikibooks.org/wiki/Ada_Programming/Operators#Shor...
- DaiPlusPlus 6y agoVB.NET also uses “OrElse” and “AndAlso” for short-circuiting. VB6 didn’t support short-circuiting at all.
- MaxBarraclough 6y agoGood example, I'd forgotten about that. On second thought I was mistaken about the example I gave. If someone says You can have tea OR coffee they're really expressing a NAND. You can have at most one out of the two options. Unlike with XOR, you're permitted to have neither. To express XOR, you'd need to say You must have tea or coffee.
- csicseri 6y agoIf you say it out loud, you will realize that the question "Do you want to eat pizza or pasta?" (exclusive-or case with the answer "pizza" or "pasta," i.e. in the sense "these are your two choices, which would you prefer?") is an entirely different utterance from "Do you want to eat pizza or pasta?" (inclusive-or case with the answer "yes" or "no," i.e. in the sense "would you like to go to an Italian restaurant?"). The first case is pronounced with primary stress on the first syllables of both "pizza" and "pasta," and with a high tone on "pizza" and a low tone on "pasta," indicating a contrast between the two alternatives. The second case is pronounced with primary stress on the first syllable of "pizza," secondary stress on the first syllable of "pasta," and a uniform tone over the phrase "pizza or pasta" on which is superimposed the rising tone on the last syllable of the sentence indicating a yes/no question. (To see that the latter is true, add "tonight" to the yes/no sentence - "would you like to eat pizza or pasta tonight?" The tone does not rise until the syllable "night.") You have to be very careful in reasoning about natural language based solely on the written record, since spoken language regularly includes features, such as the suprasegmentals (stress and intonation) in the above examples, that aren't recorded in the orthography.
- a1369209993 6y agoThe first one is not exclusive-or, though: if you wanted to eat pizza and pasta, you would not answer "no" to "Do you want to eat pizza or pasta?", you would answer "both". Rather, "or" is serving as a inclusive-or with (perhaps) the incidental implication that picking more than one doesn't make sense in the first place.
- bryanrasmussen 6y ago>inclusive-or case I used to drive my friend crazy when he would ask if I wanted a peanut butter and jelly sandwich or a ham and cheese sandwich and I would answer yes.
- benibela 6y agoHe should have given you peanut butter, and a cheese sandwich
- 6y ago
- nmg 6y agoThis may be why interrogative programming never caught on.
- etripe 6y agoIt can also be used as the equivalent to a try/catch statement in most Germanic languages (including English, though Ingveonic, really) when ending a sentence with it. "Do you like pizza, or?" Depending on the exact statement, you might catch more or less flak.