2 ms·
Why learning Haskell/Python makes you a worse programmer
- mxavier 16y agoI guess I can understand the demotivation part. I'm heavily invested in Ruby/Rails at my job and I'm often bummed out that I can't easily use Haskell idioms at my day job. However, I think the title is a little bit inflammatory (as is customary on HN it seems). Learning a language so that you can transfer its idioms to another language which uses an entirely different paradigm seems like a waste to me. I'd advocate learning Haskell for use in problem spaces where Haskell would be most appropriate rather than walking into work with your Haskell goggles on. This problem gets magnified if you work with others. Unless you want to foist a language they won't even use on them, stick with the code that is most idiomatic and understandable for the language in which you are working.
- chris_j 16y agoThis article resonates very strongly with me. My job involves writing Java. Having really gotten into Python and Clojure over the past few years, as well as dabbling with Haskell, it really frustrates me when I have to write certain things in Java that I know could be done more elegantly/safer/quicker in a more expressive language. Like the author, I often find that I am not satisfied with Java code that I write. There is always a temptation to try to use functional techniques in Java. Experience has taught me, like the author, that this usually makes the code hard to read. Does anyone have any advice for a Python/Clojure nut who has to write Java from time to time?
- Ingaz 16y agoUse python for prototyping and code generation. It works for me with C#. I do frequently: copy-paste fields from specification, make namedtuples from it, write/debug logic, and then: generate C# classes, rewrite logic in C#. Rewriting in C# is not annoying for me. I just can't play with different ideas in C# as in python. (And I can't imagine how I can write SQL without python!)
- tetha 16y agoSo... do I get this right? Learning Haskell is bad, because writing Haskell in C# looks worse than writing C# in C#? Sorry, but that is nothing new. I mean, yes. I can write shorter and more expressive solutions to a problem in Python, and I dislike writing code in Java especially if I can see how this would be easier in python or in haskell... but if I just write idiomatic, good Java/C# code in the respective language, the code will look pretty well. So.. I don't buy this at all.