$ cat "



As you probably have noticed, functional programming has recently become the new, hot thing, and one of the languages that suddenly has gotten an upswing in publicity is Haskell.

After listening to a few podcasts on functional programming I decided to play around with Haskell, and came up with the idea to use it for my Project Euler solutions. A quick search led to the Ubuntu Hardy Heron apt-packages ghc6 and haskell-mode, which are the Glasgow Haskell Compiler and an Emacs add-on for Haskell syntax support.

As always, the apt-installation was quick and simple, so in a matter of minutes I had a nice little Haskell development environment set up. The next step was to read some tutorials at the official Haskell page and shortly there after I was up and running.

I have to say that Haskell must be one of the most elegant languages I have encountered, so far. The pattern matching makes function definitions very simple and easy to read, but the detail I found the most appealing is the list definition syntax. For example:

[a | a <- [1..], a [mod] 3 == 0]

This declares an infinite list of all integers that are evenly divisible by three, which is made possible by Haskell's lazy evaluation.

A few days ago I was searching for new sites with video lectures, and to my surprise I found a great Haskell video lecture from O'Reilly Open Source Convention. The lecture was given by Simon Peyton Jones who is one of the guys behind the language. To my even greater surprise I then read that the Software Engineering Radio team had just released a podcast with Peyton Jones on functional programming and Haskell. Hopefully, more resources like these will pop up in the future.

If you are up to it, I really recommend playing around with Haskell. As a starting point, I would suggest the short tutorials at Haskell.org and the video lectures mentioned above.

Written by Erik Öjebo 2008-09-04 14:14