3 ms·
That is not necessarily a sign of a good language, though. ADD 1 TO COBOL GIVING COBOL is also readable, and yet (thankfully!) we've mostly abandoned COBOL.
by groby_b 16y ago
That is not necessarily a sign of a good language, though.
ADD 1 TO COBOL GIVING COBOL
is also readable, and yet (thankfully!) we've mostly abandoned COBOL.
And no, I'm not saying Python is bad, or like COBOL - just that readability and quality of a language are not necessarily related.
- frozenflame 16y agoI don't know that I agree, I really am not sure what "GIVING COBOL" means.
- a-priori 16y agoIt's the assignment part; it says where the result should go. In this case, back to the "COBOL" variable. But, it's optional if you're assigning back to the source: ADD 1 TO COBOL means the same thing as ADD 1 TO COBOL GIVING COBOL. But, you can also do ADD 1 TO COBOL GIVING FOOBAR to assign it somewhere else. (Yes, I just spent the last 10 minutes reading the COBOL pages on Wikipedia and Wikibooks.)
- groby_b 16y agoIt's a COBOL joke. (And a bad one at that) ADD 1 TO X GIVING Y is COBOL's way of saying y=x+1 ADD 1 TO COBOL GIVING COBOL is COBOL=COBOL+1. Or COBOL++ :)
- hetman 16y agoReally? I've never coded in COBOL and it was pretty obvious straight away that it was an assignment.
- endtime 16y agoI wasn't responding to a comment on language quality, I was responding to a comment on language readability.
- groby_b 16y agoYes, but the GP was commenting that they'd never code in that, given the "ugliness". I'd love to reply to both posts as a set, but alas, it doesn't offer that.
- mikeklaas 16y agoI don't think that "englishy" (COBOL, applescript) code is readable, and I bet many programmers agree. Python is readable because its syntax is very close to many people's version of pseudocode. This is why non-Python programmers find it easy to read.
- shadowfox 16y ago> Python is readable because its syntax is very close to many people's version of pseudocode Or at least that is what Python developers seem to believe
- pygy_ 16y agoI find Applescript quite readable, especially for its purpose, but it's a pain to write, because, unless you use it often, you never know which subset of English is valid.
- Tycho 16y agoAllegedly in the 80s software vendors sometimes advertised that their products were programmable/extensible in plain English. By which they meant BASIC.