6 ms·
APL is different from Forth and Lisp, in that the 'write-only' reputation is supported by it's programmers. Take the famous 'game of life' APL example: ``` li
by ddek 5y ago
APL is different from Forth and Lisp, in that the 'write-only' reputation is supported by it's programmers.
Take the famous 'game of life' APL example:
```
life ← {⊃1 ⍵ ∨.∧ 3 4 = +/ +⌿ ¯1 0 1 ∘.⊖ ¯1 0 1 ⌽¨ ⊂⍵}
```
It's quite logical, when you walk through it.[0] But it's harder to read 'back to front', which is what code readability is about.
[0] https://www.youtube.com/watch?v=a9xAKttWgP4 https://www.youtube.com/watch?v=a9xAKttWgP4
- eggy 5y agoI would also recommend Conor Hoekstra's version of that video for a bit more explanation: https://www.youtube.com/watch?v=pMslgySQ8nc&t=45s&ab_channel=code_report https://www.youtube.com/watch?v=pMslgySQ8nc&t=45s&ab_channel... And he even shows how you can animate it in the editor window.
- rbanffy 5y agoI can say confidently I couldn’t figure out what a line of APL code did 2 hours after writing it myself. I had to write comments at almost 5:1 ratio. In other languages it’s easier to communicate “why” you are doing something, while in APL it’s the “how” that’s easiest.