use the following search parameters to narrow your results:
e.g. subreddit:pics site:imgur.com dog
subreddit:pics site:imgur.com dog
advanced search: by author, sub...
~4 users here now
Links:
If-then-else had to be invented
submitted 3 years ago by [deleted] from github.com
[–][deleted] 4 insightful - 3 fun4 insightful - 2 fun5 insightful - 2 fun5 insightful - 3 fun - 3 years ago (0 children)
I think "else" was chosen because it was a shorter version of "otherwise". They basically mean the same thing, and it's a lot easier to type "else", so that's what they went with. Maybe not, but that would've been my course of action.
[–]sproketboy 3 insightful - 3 fun3 insightful - 2 fun4 insightful - 2 fun4 insightful - 3 fun - 3 years ago (2 children)
Why is this on github? Never heard of a blog you stupid autist?
[–]grixit 2 insightful - 2 fun2 insightful - 1 fun3 insightful - 1 fun3 insightful - 2 fun - 3 years ago (0 children)
Cool. I had been under the impression that Lovelace had addressed conditionals. What terminology did she use?
[–][deleted] 3 years ago (1 child)
[removed]
[–]Intuit 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 0 fun2 insightful - 1 fun - 3 years ago (0 children)
It's a question of what primitives to support in a language, what is expressive, and what is conducive to clear, maintainable programs. This stuff takes a lot of time to hammer out. Virtually all CPUs don't implement else, since if-then is sufficient to specify the else (if X then Y, where Y skips Z which is only done if not X).
[–]eh-non-plus 0 insightful - 1 fun0 insightful - 0 fun1 insightful - 0 fun1 insightful - 1 fun - 3 years ago (0 children)
function true(true, false){ return true(); } function false(true, false){ return false(); } function if_then_else_(condition, fa, fb) { return condition(fa, fb); }
[–][deleted] 4 insightful - 3 fun4 insightful - 2 fun5 insightful - 2 fun5 insightful - 3 fun - (0 children)
[–]sproketboy 3 insightful - 3 fun3 insightful - 2 fun4 insightful - 2 fun4 insightful - 3 fun - (2 children)
[–]grixit 2 insightful - 2 fun2 insightful - 1 fun3 insightful - 1 fun3 insightful - 2 fun - (0 children)
[–][deleted] (1 child)
[removed]
[–]Intuit 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 0 fun2 insightful - 1 fun - (0 children)
[–]eh-non-plus 0 insightful - 1 fun0 insightful - 0 fun1 insightful - 0 fun1 insightful - 1 fun - (0 children)