Getting Functional!

I've been thinking a lot about functional programming languages recently. This started for a number of reasons:

  1. At work we recently hired a new programmer who's preferred programming language is Lisp.
  2. F# (a functional programming language for .NET) just came out and so a certain .NET obsessed co-worker got me to listen to this podcast.
  3. I've always been very fond of the functional constructs in my two favorite programming languages: Python and Javascript.
  4. I recently came to love domain specific languages which are rich in functional programming tradition. Some months back I rewrote my Perl SQL generation library (DBIx::Romani::Query) as a DSS. I'll post an update when I've written some docs and made a new release.

So, I've decided to learn Haskell! If I can actually find any time to do so.

I've chosen Haskell because it is a pure functional programming language. There are many others with many other properties and coolnesses -- Erlang leaps to mind! Not to mention Lisp, the true, old school hacker language from the heady days of Greenblatt's Lisp Machine.

But I don't plan to develop any real projects in Haskell, I just want to learn more functional programming techniques which I can leverage when needed in my Python and Javascript code. In other mixed-paradigm languages like Lisp, I may be tempted to cheat and use imperative programming techniques. Haskell will keep me honest because its pure and so imperative constructs are disallowed.

I'm aching to rewrite the XML parsing and morphology tree evaluation parts of Lingwo™ using function constructs. I may even write portions in Haskell before porting it back into Javascript. That code in Lingwo™ has always irked me with its over verboseness and inelegance. But right now I'm completely focused on Memorati™ and don't really have time to get that side-tracked. But in the meantime I may occasionally be seen playing around with Haskell.