|
|
|
|
|
by skybrian
5340 days ago
|
|
Maybe it's better with more experience or when you're reading your own code, but I find that reading a Haskell program is often like reading a math paper - you can't skim it; you have to slow way down and study it, one line at a time, and look up the definition of each term as you go and think about what it means, and try out simple examples. And sometimes you don't have the background to understand the underlying concepts, so you have to study a prerequisite first. So I think to like Haskell, you have to truly believe that more abstraction is better. It's very much a mathematician's language. The thing is, when writing code, I don't want to write a math paper. When I'm done, I want it to be as smooth and easy to read and as obvious as an article in the New Yorker. |
|
Your metaphor is apt; if your code is going to be that smooth, you need to learn Haskell to the same extent you know English for the New Yorker. The Internet suggests that the New Yorker is written for a "10th grade reading level", but of course the average American has between an 8th or 9th grade level.
It does get easier with practice to read the language, and what's left after that is whatever core difficult the code being expressed has regardless of the target language, the essential difficulty. Haskell can hardly be blamed for bringing that to the foreground where other languages stuff it in the background.