5 ms·
I couldn't think of a worse clickbait title than this. The quote has nothing to do with C.
by aap_ 4y ago
I couldn't think of a worse clickbait title than this. The quote has nothing to do with C.
- observer4 4y agoLOL. That's right. Well observed. Just the "origins of C" would be a lot more honest. I also liked the commentary on theory and practice, which could have something to do with C and UNIX and the whole story.
- karmakaze 4y agoThe quote seems to apply to the origins of C upon reading. > One minor quibble was Strachey’s objection to the grammar of “IF … THEN … ELSE” statements. “I cannot allow my name to be associated with a definite recommendation to use ignorantly incorrect English,” was his view, as Hartley later wrote for Annals of the History of Computing. Strachey preferred “OR,” which conflicted with the way “OR” was used in nearly every other programming language in existence. Nonetheless, his preferences carried the day, and the CPL reference manual included “OR” in the place where users would have expected “ELSE.” That seems like a pretty stupid thing to do--perhaps not at the time by the 'do'ers.
- aap_ 4y agoSure, somebody admitted to doing something stupid, but the title is clearly meant to attract all the C bashers by pretending the quote is from someone who was involved in the development of C.
- captainmuon 4y agoMaybe language changed since then, but to me 'else' sounds right and 'or' sounds wrong: IF (condition) THEN (do-this) ELSE (do-that). I think 'or' would not go with alternative commands, but with an alternative condition: IF (condition) THEN (do-this) OR (other-condition) THEN (do-that). If you don't want to use 'else' then 'otherwise' would sound idiomatic, too.
- smcl 4y agoRemember that there’s already two commonly used elements of logic and programming (bitwise OR, logical OR) that may well form part of condition/other-condition, so while if/then/or may (subjectively) scan a little better in isolation, I think “else” might have been the right call
- cesaref 4y agoI don't remember this in BCPL, so I presume it was one of the changes from CPL?
- xnorswap 4y agoI hadn't thought about it before, but I'd have gone with: > IF THEN OTHERWISE Which avoids overloading OR and maintains better grammar. But I suspect shorter words were preferable when space was a premium everywhere not least on the display itself.
- Y_Y 4y agoWHEREUPON x PURSUANT y CONTRARIWISE z
- irrational 4y agoWherefore art thou utilizing contrarwise? Dost thy senses leave thee?
- Smaug123 4y agotwitch "Utilize" first arose in 1807 if Merriam-Webster is to be believed, well past the period you're quoting; and "dost" should agree with the number of its noun "senses". ("dost" is second-person, but you need something third-person.) In this context I also don't really like the continuous present of "are you utilizing", but I can't put words to why. I believe "hast thou taken leave of thy senses" is actually recorded to be idiomatic. By the way, ChatGPT suggests (where I've fixed its analogous error in the word "doth"): > Pray tell, wherefore dost thou employ the term 'contrariwise'?
- matheusmoreira 4y agoI remember saving this code from somewhere. #include <stdio.h> #define PREACH printf #define SHOULD_GOD_WILL if #define EACH_AND_EVERY_CREATURE_UNDER_GODS_LIGHT for #define OTHERWISE else #define RETRIBUTE return #define ALONG_WITH && #define THUS } #define LET { int main() LET EACH_AND_EVERY_CREATURE_UNDER_GODS_LIGHT (int i = 0; i < 100; i++) LET SHOULD_GOD_WILL (i % 5 == 0 ALONG_WITH i % 3 == 0) LET PREACH("Fizzbuzz!\n"); THUS OTHERWISE SHOULD_GOD_WILL (i % 5 == 0) LET PREACH("Buzz!\n"); THUS OTHERWISE SHOULD_GOD_WILL (i % 3 == 0) LET PREACH("Fizz!\n"); THUS OTHERWISE PREACH("%d\n", i); THUS RETRIBUTE 0; THUS
- GTP 4y agoAccording to the article, the stupid thing was developing a new language just because you built a new computer. But the efforts in developing this new language (CPL) are what lead to C.
- fanf2 4y agoThere is a neat history of the early syntax of conditional expressions here https://github.com/e-n-f/if-then-else/blob/master/if-then-else.md https://github.com/e-n-f/if-then-else/blob/master/if-then-el... titled “if-then-else had to be invented”. It seems “else” originated in Algol 60 as a hasty translation from German. The CPL project started in the early 1960s when it was not yet certain that Algol-style block structure and keywords would become the common basis of most programming languages.
- dang 4y agoThe article does talk a lot about the origins of C, so it's fair for that to be in the title. We can make it more accurate by throwing in CPL and BCPL too.
- rramadass 4y agoAgreed. The title is garbage (Ars should know better). But the article is a good History of C and worth a read.