Learning Python and Haskell has not improved my programming (2006)
lukeplant.me.uk
lukeplant.me.uk
After learning an unrelated programming language he isn't able to write idiomatic code in a different programming language with a different paradigms.
That's like being depressed when wanting to curse in English as the Russian curse words are much better but when translating them into English, they lose a lot of their appeal.
This programmer should learn that you shouldn't fight the basic premises of a language. That leads sometimes to ugly code but this often is still the best you can do within this particular language.
Also the next programmer to maintain this code will be much happier.
Before FP, I would implement a compiler as a massive state machine. In FP, I think more in terms of small functions that work together in a stream, and the state machine is implicit. With declarative programming, I think in terms of defining the grammar.
I don't use FP techniques for everything, but my whole way of approaching a problem is different because I know that other options exist. Sometimes I'll use a for loop, other times I'll make a recursive mapping function, it really depends on which solution is simpler and less likely to have bugs.
Also, using Haskell 'very little' will not give you the experience you need to write something like this. Haskell has a (very) steep learning curve and you need to recognize ways to solve problems and to see the elegance (and the warts as well by the way). That takes time and effort; maybe there are people who just get it, I am definitely not one of those people, but the work, for me, was definitely worth it.
The language has added significant functional capabilities in the last 13 years...