Posts tagged: HASKELL

Yegge's crusade

I’m generally a big fan of Steve Yegge’s rants. See this earlier post for links and quotes from some of my favorites. His writings were a significant influence in my decision to seriously look for a new language to learn in 2007 – I even bought Programming Language Pragmatics on his recommendation, piecemeal reading of which has definitely expanded my thinking (as well as dredging up parts of that Compiler Construction course I took back in 1989…).

Learning Haskell inch by inch

I did some more Haskell reading over the long weekend, mostly from Yet Another Haskell Tutorial*. There is definitely some challenging stuff (the Monads chapter in A Gentle Introduction to Haskell begins, ‘This section is perhaps less “gentle” than the others…’).

Overall, though, the combination of elegance and power and consistency in Haskell is very satisfying. The language has very little to apologize for.

I’m not really able to write much code yet, but I’ve started to be able to read it. I’m playing with adding Haskell coloring to dpaste, via the HsColour colorizing engine (written in Haskell, naturally). In trying to track down some formatting glitches – which may well turn out to be in my code, not theirs – I was actually able to look at the HsColour source and kind of understand how it does its thing.

The whitespace brigade

Syntactically significant whitespace is one of those debating points frequently raised in unproductive language thrashes involving Python. One persistent implication made by SSW-haters is that it’s a freakish mutation unique to Python. Or, if they’re feeling particularly vicious, they’ll bring up Fortran. Cold comfort.

In fact, there are quite a few other languages that have gone down this path. Flipping through a big fat book that I bought because Steve Yegge recommended it, I came across mention of a couple that were new to me. Then I went digging for more. Here’s an incomplete list:

It's Haskell

In my programming resolutions post last week, I mentioned a short list of languages I was considering learning (or attempting to learn, anyway) in 2007.

I’ve decided on Haskell. Some of my reasons:

  • It’s different. My “home language” is Python, which is great. But for a growth exercise, different is good. Blog posts bemoaning the weirdness and difficulty of Haskell only goad me on. Ruby is different from Python, but not as different as Haskell. Its declarative aspects remind me of Prolog, which I found strangely satisfying when I played with it in college.
  • It’s a functional language. The functional style has always appealed to me, something I was reminded of when playing with Scheme last year.
  • It feels like it’s growing. I wouldn’t say Lisp and Scheme are dying (if anything, they seem to be in a renaissance), but Haskell is popping up everywhere I look. Maybe I look in weird places. (I note that while the Pragmatics’ “Language of the Year” page doesn’t seem to have been updated since 2002, their 2002 pick was… Haskell.)
  • The community seems good. One of the things I did when “researching” (I use that term loosely) languages was stick my head into their respective IRC channels. I found #haskell to be very friendly and active; that’s very appealing when you’re a solo developer trying to sort out confusing new concepts. The Haskell Sequence is a great resource, busy and wide-ranging but not overwhelming.

On the down side, let’s see… well, the logo is pretty ugly.