Saturday, August 8, 2009

Picking up Haskell

I've been reading so much about Haskell lately, it started to annoy me. When that happens I felt like I had two options:

1. Ban everything Haskell from my newsfeeds.
2. Learn it just to see what the fuss is about.

Obviously I've chosen the latter.
It's not that I don't like Lisp anymore, far from it! But a couple of blog posts have made me think about learning a 'current' functional language. Something shiny, something that can cope with all the buzzwords (concurrency and whatnot)...

So I decided to give it a go. I've been reading the excellent, excellent Learn You a Haskell For Great Good. (I cannot emphasize enough how good this book is. It's not even finished yet but I already tried to pre-order the print version of it.)

At first glance, Haskell seems very complicated. All those little arrows, double colons, pipes,.. very syntax heavy. Using Lisp for about a year now I've grown very fond of almost no syntax at all.
Still, I decided to give it a chance and started reading. After a couple of pages I was already going "Hmm this isn't so bad afterall...".
They had me at list comprehensions and pattern matching. It's like reading a mathematical definition. Only, you can execute it too! Haskell is filled with flashy words too.. currying, partial application, functors, monads. While I haven't had the (I assume) pleasure to read up on monads, all the other words are just a fancy name for a fairly straightforward concept...
Also, Haskell forces you to think functionally, while Lisp only encouraged it. I've caught myself several times writing in an imperative fashion in Lisp. (Old habits I guess...).
I'm really looking forward to be proficient in a functional language.

Anyway, long story short, I really like Haskell so far. I've already seen glimpses of how it can also be practical.
I must admit I'm more excited about learning Haskell then I was about learning Lisp. And I already thought Lisp was the best thing since sliced bread.

We'll see how it goes!

1 comments:

ozten said...

Awesome! I look forward to following your progress. I'm also working my way through RWH at http://ozten.livejournal.com