Live data from Hacker News

Ask HN: What are specific tangible benefits of learning Haskell?

news.ycombinator.com

1–10 of 37 posts

Ask HN: What are specific tangible benefits of learning Haskell?

#1
I've worked in C/C++ for many years and recently started trying to learn Haskell. As many new people learning Haskell, I am running into issues with not just the quality of learning material but the general attitude of members of the Haskell community. For example, when asking for an explanation of a particular topic recently, I received a barrage of insults about how annoying it is for people to be asking such questions, short unhelpful answers without explanation, a near constant refrain of "ask this question on IRC" because apparently people cannot be bothered to answer questions outside of there, answers which do not actually answer the question raised, various forms of pats on the head and patronizing "You go ahead and think that, Timmy. You'll soon see how wrong you are" styled answers, etc., etc., etc. Some members of the community have been nice but the more abrasive members have left a sour taste in my mouth. Is anyone ready, willing, and able to provide clear and concise explanations of specific tangible benefits of learning Haskell? I've spent almost 6 months trying to learning the language and I really don't feel like wasting another 6 months if it's not worth the effort in the end. If making objectively verifiable arguments, like "functions are more concise", please provide proof of claim.

Re: Ask HN: What are specific tangible benefits of learning Haskell?

#2
http://www.paulgraham.com/know.html

Learning Haskell adds to the mass of things you know, and the volume of that mass determines the level of your general expertise.

You asked for tangible things, but it's harder to see what those may be. Perhaps your perception will be enhanced: perhaps you will better see and care about side-effects, opportunities for pure functions, etc.

I don't think any learning effort that leads to increased knowledge can be a waste of time.

Re: Ask HN: What are specific tangible benefits of learning Haskell?

#3
Funny, I once asked the same question about pure mathematics, and got similar answers. In the end I decided pure math wasn't the best bang for buck in terms of benefit to humanity, and decided to work on other things.

When it comes to Haskell, there is a big problem that the people best qualified to speak on the matter have invested a lot of time in Haskell, and therefore are subject to biases associated with their investment in the field.

For one thing, I would ask what programs use Haskell. The only major project I'm aware of is xmonad. This should tell you something about how practical Haskell is.

On the other hand, you may learn something from Haskell. I studied Haskell because I believe there are much better languages out there, and in order to find them we need to understand and improve on the theoretically most advanced languages (i.e. dependently typed languages) and learning Haskell was the best starting point. If this is not your goal, I actually doubt another 6 months of Haskell will help your day to day programming.

Also, what have you managed to learn in the past 6 months? And how were you studying? I found Learn you a Haskell to be the best introduction.

Re: Ask HN: What are specific tangible benefits of learning Haskell?

#5
To me the value of Haskell comes from its being an extreme point in the language design space: that of a pure, lazy, strictly-typed language. I think that Haskell provides a very nice syntax and GHC a very nice implementation for exploring this extreme point. The primary benefit of this exploration is that it enriches our understanding as a community regarding language design and program design. I think that is a worthwhile enough contribution.

I think that Haskell's strangeness harms it in two ways. One it puts off people because the superficial strangeness takes some getting used to. More dangerously it makes a small fraction of Haskell programmers dangerously arrogant. They feel that just because they are now familiar with this strange jargon they have become superior to the users of other languages. Depending on temperament this turns them into snobs or evangelists.

I don't think there is any concrete evidence of Haskell's superiority as a practical tool. Programs like pandoc, darcs or xmonad are great but there is no proof (and as far as I know neither have their authors claimed) that they were easier to develop than comparable programs in imperative languages (TeX, git?).

Much better is the attitude of Haskell leaders like Simon Peyton Jones who present Haskell as a ongoing research project with its set of successes and unsolved problems: http://research.microsoft.com/en-us/um/people/simonpj/papers... http://research.microsoft.com/en-us/um/people/simonpj/papers...

Re: Ask HN: What are specific tangible benefits of learning Haskell?

#6
I too found learning Haskell difficult, because there is, or so it seems, quite a big hurdle to get over at the start.

But it turns out that you can live in the IO Monad and just write Haskell as if were a strongly-typed kind of Python, and quickly get to the point where you are doing something useful, and benefiting from the type system and lazy evaluation (e.g. being able to define an infinite list then just consume as much of it as you want) and the nice syntax for pattern matching, and so on. Then you can gradually add in more and more Haskell concepts as and when a) you feel ready and b) you encounter situations where they'd be useful.

Jumping straight in with monads is the wrong way to do it (and monads are actually easy if you let them sneak up on you rather than trying to chase them, like cats) and the monad tutorials you find on the web are all written by idiots who think they a lot cleverer than they are. Burrito Spacesuit guy, I'm looking at you.

Re: Ask HN: What are specific tangible benefits of learning Haskell?

#8
post #6

I too found learning Haskell difficult, because there is, or so it seems, quite a big hurdle to get over at the start. But it turns out that you can live in the IO Monad and just write Haskell as if were a strongly-typed kind of Python, and quickly get to the point where you are doing something useful, and benefiting from the type system and lazy evaluation (e.g. being able to define an infinite list then just consum…

So, are you saying there are no tangible benefits?

Re: Ask HN: What are specific tangible benefits of learning Haskell?

#9

To me the value of Haskell comes from its being an extreme point in the language design space: that of a pure, lazy, strictly-typed language. I think that Haskell provides a very nice syntax and GHC a very nice implementation for exploring this extreme point. The primary benefit of this exploration is that it enriches our understanding as a community regarding language design and program design. I think that is a wor…

So, the only tangible benefit you see is "it enriches our understanding as a community regarding language design and program design"? To be clear, when you say, "I think that is a worthwhile enough contribution," are you saying this benefit of enrichment is "worthwhile enough" to warrant learning it?

Re: Ask HN: What are specific tangible benefits of learning Haskell?

#10
post #6

I too found learning Haskell difficult, because there is, or so it seems, quite a big hurdle to get over at the start. But it turns out that you can live in the IO Monad and just write Haskell as if were a strongly-typed kind of Python, and quickly get to the point where you are doing something useful, and benefiting from the type system and lazy evaluation (e.g. being able to define an infinite list then just consum…

So, are you saying there are no tangible benefits?

Not at all, there are loads, see for example http://donsbot.files.wordpress.com/2009/01/semicolon.pdf

What I'm saying is, don't let a minority of the community put you off. The "conventional wisdom" on how to learn Haskell, is wrong.

Post reply on HN