Live data from Hacker News

Why Haskell Is Worth Learning

spin.atomicobject.com

1–10 of 114 posts

Re: Why Haskell Is Worth Learning

#3

That complex function will turn out to be not all that complex at all; it can be written as just three simple functions composed together! -- Why this requires to learn Haskell, instead of ML or Scheme or Erlang?

The skill of breaking down large functions into smaller simple functions is a common skill of programming and should be practiced in all languages (C, Java, Python, etc). I'm not really sure from the article what I am supposed to gain by learning Haskell.

I'm not debating the opinion that Haskell is great language to learn, but the benefits of learning the language were not clear to me after reading the article. Does anyone care to elaborate?

Re: Why Haskell Is Worth Learning

#4

That complex function will turn out to be not all that complex at all; it can be written as just three simple functions composed together! -- Why this requires to learn Haskell, instead of ML or Scheme or Erlang?

Those are all great languages. Haskell by no means has a monopoly on mind expanding features. But I think that the enforced purity of Haskell along with laziness and the powerful type system is a particularly brain twisting mix.

Re: Why Haskell Is Worth Learning

#7
post #5

Relevant points on Haskell, from another discussion, and sort of echoes my own thoughts: http://news.ycombinator.com/item?id=5314701 http://news.ycombinator.com/item?id=5314507

At university the very first language we are taught is Haskell. Lots of people had never programmed before, in anything and everyone managed fine. Nothing scary at all, no need for an understanding of category theory or anything.

Monads are (fairly) simple things that just have a really bad reputation, partly the fault of the haskell docs which make them seem complex.

Firstly:

Functors are things we can map over in a logical way; thats it. Monads are just a fancy way of saying "side-effects might happen here" (obviously not in all cases, but its fair enough for most uses - things like the Maybe Monad are not side effects)

Re: Why Haskell Is Worth Learning

#8
I am no Haskell expert, so I might be wrong on this, but is that code right ? I would imagine the fourth line should read

    isIfOfInterest (CIf cond _ _ _) = not (null (listify isFooIdent cond))
not

    isIfOfInterest (CIf cond _ _ _) = not (null (listify fooIdent cond))

Re: Why Haskell Is Worth Learning

#9
post #8

I am no Haskell expert, so I might be wrong on this, but is that code right ? I would imagine the fourth line should read isIfOfInterest (CIf cond _ _ _) = not (null (listify isFooIdent cond)) not isIfOfInterest (CIf cond _ _ _) = not (null (listify fooIdent cond))

You are correct. The nice thing is that this mistake would have been caught compile-time.

Re: Why Haskell Is Worth Learning

#10
post #3

That complex function will turn out to be not all that complex at all; it can be written as just three simple functions composed together! -- Why this requires to learn Haskell, instead of ML or Scheme or Erlang?

The skill of breaking down large functions into smaller simple functions is a common skill of programming and should be practiced in all languages (C, Java, Python, etc). I'm not really sure from the article what I am supposed to gain by learning Haskell. I'm not debating the opinion that Haskell is great language to learn, but the benefits of learning the language were not clear to me after reading the article. Does…

[deleted]
Post reply on HN