3 ms·
Just a jumble of random words. They are especially difficult to non-english speakers, because they are not grammatically correct sentences, but rely on some unk
by timonoko 6y ago
Just a jumble of random words. They are especially difficult to non-english speakers, because they are not grammatically correct sentences, but rely on some unknown word-order logic in indo-european languages. Same aplies to list comprehension sentences in Python too.
- andi999 6y agoCan you elaborate? I have difficulties understanding what you mean. Do you really mean an idiomatic loop should be 'a jumble of random words'?
- timonoko 6y agoDifficult to explain cause not an expert, but most languages do not have "list comprehension" by post-description. "New York has rats bigger than a dog" comes to mind. In Finnish you can but the adjective word have same ending or grammatical case as the main word. Without those clues the sentence would be nonsensical.
- shakow 6y ago> but most languages do not have "list comprehension" by post-description. "New York has rats bigger than a dog" comes to mind. « New-York a des rats plus gros que des chiens »
- timonoko 6y agoThat is an indo-european language. Those languages have no grammar or rules. You just string words together and hope it makes sense.
- shakow 6y ago> You just string words together and hope it makes sense. I beg your pardon? Messing the word orders in French or German will definitely mess up the sentence. The German would be something like “Im New York sind Ratten, die größter als Hunden sind”, and moving the words would make the sentence invalid – albeit probably understandable.
- guenthert 6y agoIs that truly a stumbling block? I ask because English is not my native language. Around the time I learned English in high school I also became interested in computers, which to me then meant programming in BASIC. It took an embarrassingly long time for me to realize that e.g. GOTO was actually formed from 'go to' -- to me, "GOTO <n>" just meant that program flow would continue at line <n>, nothing more, nothing less. "IF" was just a mnemonic introducing a conditional branch, etc. . I didn't perceive my poor grasp on English as a hindrance in learning to program (as thankfully introductory text were available in my native language). Of course, you need a good handle on the language, when communicating with co-workers (and all code is communication), but that came much later.
- ashtonkem 6y agoThe problem with the Loop macro isn’t the English, it’s that it doesn’t look anything like the rest of the language. It’s like finding some embedded Python in your Java; even if you’re fine with using Python, it’s going to be pretty hard to work with when you’re in Java mode. Also, macros are much harder to debug, especially when the macro expansion code itself crashes. The loop macro does a lot of work, which makes it a particularly annoying macro to fix when things go wrong.
- guenthert 6y agoI wasn't defending the LOOP macro, but I think your critique comes 30 years too late ;-}
- andi999 6y agoThe 'go to' thing probably took me 30 years to realize. I was puzzled when I read the 'go to considered harmful'and the 'structured programming with go to' article until I realized.... It is probably the same as in your case, I learned programming before learning English.
- timonoko 6y agoLOOP is just a little bit more complex than BASIC: (LOOP FOR I FROM 0 BELOW (LENGTH S) THEREIS FOR CH = (CHAR S I) WHEN (< I 0) ALWAYS DO (RETURN CH)) *** - loop: illegal syntax near for in (loop for i from 0 below (length s) thereis for ch = (char s i) when (< i 0) always do (return ch))