How not to program in Dyalog APL
5 points by vlnn
5 points by vlnn
I wrote a lot of APL when I first encountered it, but I ignored these kinds of "best practices", and used a style that made the code easy to write and easy to understand. Yes, I used imperative control structures.
When I read essays advocating for APL and its descendants, the favoured practice seems to be to golf the code so that it is as compact as you can make it, pushing yourself to your cognitive limits. Many good sounding reasons are given for this practice. The downside is that this makes the code less readable, both for other people, and for your future self.
If you practice reading and writing dense, idiomatic code in APL-family languages, it becomes easier and easier to read and write them in this style.
If you practice writing every language as if it were Go, and refuse to read anything else, you'll only be able to read Go.
"Readable code" just means "a familiar coding style (to me)". It is not and will never be an objective metric independent of the human observer.
One way you could get to an objective metric for code readability is by determining how many years of training and experience is required before the code is readable. The genius of Go is that the learning curve is shallow, compared to many other languages, before you can read and write idiomatic Go code.
I was programming APL professionally for years, and thus I'm crazy against most of the points in the article, and thus it is even more interesting.