3 ms·
In colloquial english we usually put an "or" in front of else. It really breaks down when you put it in boolean form because the "or" implies other actions when
by maire 6y ago
In colloquial english we usually put an "or" in front of else. It really breaks down when you put it in boolean form because the "or" implies other actions when true rather than actions if false. Removing the "or" completely is unambiguous but is antiquated English.
Examples:
"Go to college or else work for your uncle"
Turn this into boolean form:
"If you go to college then <foo> or else you will work for your uncle"
But the "or" makes the meaning ambiguous:
"If it rains then I will work inside or else I will work outside."
It is not clear if this means you will work outside if and only if it is not raining? Maybe working outside is another option if it rains.
Otherwise is far more clear.
"If it rains then I will work inside otherwise I will work outside."
Removing the "or" completely makes the statements unambiguous archaic English:
"If you go to college then <foo> else you will work for your uncle"
"If it rains then I will work inside else I will work outside."
FWIW - I am very glad they chose else over otherwise...
- asciimov 6y ago> But the "or" makes the meaning ambiguous I disagree that or is ambiguous. In English we use or to mean xor, that is one item or the other item but not both. If we want to clarify that choosing both items is an option we use the term and/or.
- thih9 6y ago> I disagree that or is ambiguous There are examples of inclusive “or” in natural language. When the waiter asks: “Would you like cream or sugar?”, it’s not meant to imply that you should pick only one; it’s fine to answer “both” (example from: https://divisbyzero.com/2009/09/27/is-or-an-inclusive-or-or-an-exclusive-or/ https://divisbyzero.com/2009/09/27/is-or-an-inclusive-or-or-... ).
- chrismorgan 6y agoAnd if you put a comma in, then it reverts it to exclusive or: “Would you like cream, or sugar?” This may depend on locale, however; I’m speaking of Australian English, and it’s possible that in some locales there may be a verbal cue to indicate the exclusive or but that it wouldn’t be spelled in any way. (As it stands, you could still have a pause before the “or” permitting inclusive or with two inqusitive portions: “Would you like cream? Or sugar?”) This is a large part of why I dislike prescribed Oxford comma, because it undermines this legitimate use of a comma to alter the semantics.
- darkerside 6y agoThe human language leaves the decision to the executor, dependency injecting an if/else framework into the entity making the decision.