Monday, February 09, 2009

A long time ago, I was an aficionado of a language that told me that the three traits of a great programmer are laziness, impatience, and hubris. Then I discovered Ruby, which taught me about the Principle Of Least Surprise and that programming should be fun. Now, in Real World Haskell, Bryan O'Sullivan, John Goerzen, and Don Stewart promise me three things as I read their book to learn about Haskell: novelty, power, and enjoyment. That sounds like a pretty good deal to me.

After conducting an interview with Bryan, John, and Don I kept looking for a break in my reading list where I could put RWH, and I finally decided to make the room instead of waiting for it to occur on its own. Yesterday, my copy arrived.

I was immediately struck by the size of the book. Programming in Haskell (which I wrote about, briefly, here ) is a relatively modest 155 pages while RWH weighs in at 640 — and what I've read so far is very approachable.

Reading through the ToC and Introduction, I've built the following list of questions I want to keep in mind as I read:

What value do I gain from strict, static typing? How does this compare to the value I gain from strict, dynamic typing?

What about Lazy Evaluation?

What about Polymorphism?

Why bother with whitespace?

How do I think in Haskell?

What about Composition and code re-use? (How does it conpare to Factor/Forth?)

How do I keep code readable? How is this different than in Ruby?

How does the FFI work? How does this compare to Ruby's?

How does concurrent programming work? How does this compare withErlang? With Ruby?

How does STM fit into things? What should this teach me about threads? About Actors?

How do I profile, benchmark, and optimize?

And of course, the biggest question of them all: When should I be reaching for haskell instead of Ruby, bash, or C?

I've also put together three little goals for myself. By the time I finish the book, I want to use haskell to write:

a wiki

a twitter scanner

a log analyzer

I'll try to write about my progress through the book, insights into the questions above, and progress toward my three goals. Feel free to share your thoughts as well.