Saturday, August 23, 2008

Learning Haskell Redux

When you are looking for a nice language that doesn't suck, which would inevitably rule out the languages most of us use at work, there are many choices. Usually, I am torn between Lisp, Erlang and Haskell. I have become quite comfortable with Lisp but Erlang and Haskell still present a high starting effort.

So, I started toying with another language JRuby. Unfortunately, the issue of FFI in JRuby is still a challenge and JRuby still has a few rough edges. After a few attempts at using it, I gave up and decided to try Haskell instead. One of my requirements was to be able to implement COM client programming and Haskell turned out to be not such a challenge after all. I will blog more on my COM client in Haskell later.

Picking up Haskell after a couple of years has been interesting. Much to my surprise, my understanding of Haskell has improved a lot. Interestingly, Lisp proved to be quite a challenge in the beginning but at some point, it became quite natural. The best way I can describe that is that the parenthesis seemed to disappear and suddenly everything became very clear. I am having a similar experience with Haskell at the moment. Suddenly, I really understand the benefits of monadic style of programming. The understanding has progressed beyond that is gained by reading what others have written.

Speaking of other's work, I discovered a new Haskell book in progress, http://book.realworldhaskell.org/. The few chapters I have read have been very useful. I am glad to a book which makes this wonderful language more accessible.

Haskell is a complex language and a real mind bender. However, a pragmatic approach to learning it is likely to be an easier course for most people. Hopefully, I will be able to blog as I go along and end up with something worth reading.

No comments:

Post a Comment