22 ms·
"Python and Ruby (in particular these two) more than anything else allowed you to write really terse, expressive code." If you like being able to write terse,
by gnosis 14y ago
"Python and Ruby (in particular these two) more than anything else allowed you to write really terse, expressive code."
If you like being able to write terse, expressive code, you'll love APL,[1] where Conway's Game of Life[2] can be written in one line as:
life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}
[1] - https://en.wikipedia.org/wiki/APL_(programming_language) https://en.wikipedia.org/wiki/APL_(programming_language)
[2] - https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
- vidarh 14y agoWe also want our code to be readable.
- jjore 14y agoI can't read APL but perhaps that is readable. I'm unsure that other common dynamic languages like Ruby or Python are readable purely in comparison purely for using http://en.wikipedia.org/wiki/COBOL#Verbose_syntax http://en.wikipedia.org/wiki/COBOL#Verbose_syntax.
- _ZeD_ 14y agoI think a really simple rule-of-thumb for code is: "can you dictate it through the phone?"
- vorg 14y agoCode has nested structures which are commonly shown with indentation, which it's difficult to communicate vocally with say, intonation. E.g. think about how differently you'd dictate this variation on your reply... I think a really simple rule of thumb-for-code is "can you dictate it?" through the phone.
- saryant 14y agoshudder My first introduction to functional programming was with J (APL but using ASCII) during my sophomore year of college and I definitely didn't have the chops to understand it at that point. I was scared of functional languages for another year until a different professor introduced me to Haskell.
- vorg 14y agoAPL is far more readable than J in my opinion, perhaps because APL keeps the brackets and curlies balanced, while J doesn't. All operators in APL are one token long, while J uses multi-token operators. The extended character set of APL has many benefits.
- coldtea 14y agoThis is terse but not expressive.
- mseepgood 14y agoIt is highly expressive.