Steve Jenson's blog

Haskell thoughts.

Haskell thoughts.

Writing A Lisp Interpreter In Haskell is a fun article about writing a Lisp interpreter in less than 200 lines of Haskell, repl and all. His experiences with Haskell's expressiveness and concision mirror my own. I am just blown away by how difficult programs are easy to express in the language while still being easy to change as your approach to the problem's solution changes.

It takes quite a lot to effort to learn Haskell. One of those "learn haskell in an hour with our fancy tutorial" so prevalent in other languages will not adequately prepare you for any semi-serious Haskell code; there is simply too much to the language for a quick flyover. I've read several books and papers and written maybe 5k lines of Haskell now and I still feel like I've just scratched the surface. My experience in Lisp, Erlang, and ML have helped me quite a bit but the only way to achieve any success in this language is to start digging, I think.

A few of my favorite haskell features sofar:

  • partial application and currying are built into the language and are very natural to use.
  • use of higher order functions also require no painful machinations.
  • anonymous functions can be created anywhere with only three extra characters.
  • algebraic data types.

I'm a little down on Monads although the article linked to above has given me a new perspective on them. I've been learning category theory to help me find more novel uses than just abstracting away IO but no deep insight has hit me yet. I'm prepared to give it time, I believe it will pay off.

# — 02 April, 2007