I have learned Haskell during my bachelor's degree and I cannot say it has made a big difference for me, although I do understand why people like the concepts of it. Recently, I was suggested by a professor to re-learn it. He suggested me so because I was making a presentation on how to extend the standard library of my university's pet language NIT, which is pure object oriented. Apparently, he thought that my additions were influenced by the functional paradigm.

Therefore, following his suggestion, I re-learned Haskell and tried to implement my master's project in it, to sort of test it out.

I was pleased because Haskell:
-Emphasizes more on formalism than actual machine code algorithms
-Abstract much of the machine oriented concepts in the favor of more mathemathical ones
-The resulting code CAN BE much, much more lightweight

I was displeased because:
-When it comes to IO, you have to work harder, and IO it is for real world applications -IO and mutable states also include a whole bunch of complicated data structures /algorithms which are just a pain to implement in Haskell compared to machine oriented languages

So I just abandoned the idea (I used complicated data structures). I think what Bearophile said sums it up the best: It's really a matter of what is the problem you and how you are planning to solve it. Sometimes a paradigm fits best, sometimes its a burden. Sometimes a language is better, sometimes it isn't.

Most of the times, I find extensions of procedural languages to be the best answers. And this is why I love D. Power, flexibility, support for A LOT of paradigms with the right amount of compromises. Describing the language features and comparing it to others just don't show how great it is. D starts to shine when you actually program something complicated in it.

Often, when using D, I found myself thinking: "Oh! I can do that, sweet!", rather than: "Oh! I can't do that, right... So how to I workaround it...". Some people think that the "working around it" is the true benefit of functional languages, and there are times when they are right, and there are times when they aren't.

In conclusion I'd say that yeah, maybe Haskell can make you a better programmer, but maybe it won't change a thing. Incorporating many concepts and paradigms and knowing when which is best, that is the true challenge: not being forced to use one for everything. So maybe Haskell will help you understand functional paradigm, and that is what's great about it. But, IMHO, when you construct a huge software using multiple inputs/outputs/data structures/arcane algorithms/..., the functional paradigm might get in your way...

Reply via email to