Earlier quoted context omitted.
The word “and” in English is simply there to join multiple clauses together. Whether it is a set union or set intersection, (or some other relations) depends on the sentence. Set union: they can read and write’ Set intersection: my jeans were creased and dirty Sequential: he turned round and walked out Causal: there was a flash flood and by the next morning the town was under water’ And, there are many more usages.
It's surprising how often you can replace 'but' with 'and' in a sentence.
If-then-else had to be invented
71–80 of 255 posts
Re: If-then-else had to be invented
#72If the question is, what was the first programming language that introduced "If-then-else" then the read makes sense, but I'm not sure if was really an inventive step. In propositional logic, which was developed well before the first computers by Leibniz, Frege, Boole, De Morgan, etc.: "If A then B else C" can be stated as: (A --> B) ^ (¬A --> C) So, in patent/invention language, I'm not sure if it would really const…
Re: If-then-else had to be invented
#73I remember there was a paper that tried to compare natural language usage of common programming language keywords to see if they may come up with other constructs to create a programming language that is easier to learn as your first one. There were a few interesting observations. The one that stuck with me the most is that 'and' is most commonly used with almost the opposite sense in natural language vs programming:…
candy | kids
Where candy and kids are self contained programs that already understand the operations which make up candy and kids.Re: If-then-else had to be invented
#74I remember there was a paper that tried to compare natural language usage of common programming language keywords to see if they may come up with other constructs to create a programming language that is easier to learn as your first one. There were a few interesting observations. The one that stuck with me the most is that 'and' is most commonly used with almost the opposite sense in natural language vs programming:…
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.
Only to IT people though. Common folks will just look at you in a weird way...
Re: If-then-else had to be invented
#75You can use "else" that way in ordinary speech. "If this then do that else do the other thing" is perfectly legitimate English, just a bit archaic.
Wiktionary has a usage example from 1903, clearly before modern computers but not too ancient. > 1903, Jack London, The Call of the Wild, Grosset & Dunlap, page 44: > […] and his first experience taught him an unforgetable lesson. It is true, it was a vicarious experience, else he would not have lived to profit by it. As an aside there is at least one common word which does seem to have been invented by the software…
The comic Calvin & Hobbes corroborates the novelty of this verb in this strip from 1993: https://www.gocomics.com/calvinandhobbes/1993/01/25
Re: If-then-else had to be invented
#76Earlier quoted context omitted.
The word “and” in English is simply there to join multiple clauses together. Whether it is a set union or set intersection, (or some other relations) depends on the sentence. Set union: they can read and write’ Set intersection: my jeans were creased and dirty Sequential: he turned round and walked out Causal: there was a flash flood and by the next morning the town was under water’ And, there are many more usages.
It's surprising how often you can replace 'but' with 'and' in a sentence.
Re: If-then-else had to be invented
#77I remember there was a paper that tried to compare natural language usage of common programming language keywords to see if they may come up with other constructs to create a programming language that is easier to learn as your first one. There were a few interesting observations. The one that stuck with me the most is that 'and' is most commonly used with almost the opposite sense in natural language vs programming:…
The word “and” in English is simply there to join multiple clauses together. Whether it is a set union or set intersection, (or some other relations) depends on the sentence. Set union: they can read and write’ Set intersection: my jeans were creased and dirty Sequential: he turned round and walked out Causal: there was a flash flood and by the next morning the town was under water’ And, there are many more usages.
"Women and children were present" isn't saying the intersection of the women and children were present but that the things were women and children and they all were present.
The rest of the variety of "meanings" of "and" are just inferences on top of this basic meaning. If things occur in sequence, for instance, we can infer causality from what we know about the things conjoined apart from the conjunction.
Crucially, there is more here than just "joining multiple clauses together" (and many of the things conjoined aren't clauses), because "or" can be described this way too, but "and" does not mean the same thing as "or". With "or" you are only asserting that some of the propositions are true.
Re: If-then-else had to be invented
#78I remember there was a paper that tried to compare natural language usage of common programming language keywords to see if they may come up with other constructs to create a programming language that is easier to learn as your first one. There were a few interesting observations. The one that stuck with me the most is that 'and' is most commonly used with almost the opposite sense in natural language vs programming:…
The word “and” in English is simply there to join multiple clauses together. Whether it is a set union or set intersection, (or some other relations) depends on the sentence. Set union: they can read and write’ Set intersection: my jeans were creased and dirty Sequential: he turned round and walked out Causal: there was a flash flood and by the next morning the town was under water’ And, there are many more usages.
Re: If-then-else had to be invented
#79I remember there was a paper that tried to compare natural language usage of common programming language keywords to see if they may come up with other constructs to create a programming language that is easier to learn as your first one. There were a few interesting observations. The one that stuck with me the most is that 'and' is most commonly used with almost the opposite sense in natural language vs programming:…
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.
Re: If-then-else had to be invented
#80If the question is, what was the first programming language that introduced "If-then-else" then the read makes sense, but I'm not sure if was really an inventive step. In propositional logic, which was developed well before the first computers by Leibniz, Frege, Boole, De Morgan, etc.: "If A then B else C" can be stated as: (A --> B) ^ (¬A --> C) So, in patent/invention language, I'm not sure if it would really const…
It's interesting to me that these identities and the canonical form McCarthy introduced there were exactly how BDDs work (when you just add memoizing, which was also invented about the same time) -- but BDDs weren't invented until the 1980s. (Explanation at https://codewords.recurse.com/issues/four/the-language-of-ch...)
It's easy to think things are obvious in hindsight.