[Haskell-cafe] How did you stumble on Haskell?

Jeremy Shaw jeremy.shaw at linspireinc.com
Mon Jan 29 13:54:21 EST 2007


I was working in embedded development, writing lots of C code. My
primary tool for debugging things was turning an LED on or off. So, I
became quite interested in figuring out how to write code with less

After some searching, I found lclint, (now knows as splint:
http://lclint.cs.virginia.edu/). lclint performs static analysis on C
code to find things like uninitialized variables, memory leaks, and
tons of other stuff. In order to get the most out of it, I had to
annotate my code like this:

extern char *gname;
extern /*@truenull@*/ isNull (/*@null@*/char *x);

void setName(/*@null@*/ char *pname)
  if (!isNull (pname)) { gname = pname; }

Although marking up the code was a bit tedious, the amount of errors
that it caught was astounding. And, typically, my code actually worked
on the first try after I fixed anything lclint complained about.

I decided that this thing static error analysis stuff was pretty
spiffy and set out to look for a language that had it built-in by
default. I originally started with Concurrent Clean 1.x, but
eventually settled on Haskell (GHC 5.04) for reasons I do not
remember. I think it may have been because Haskell seemed to have a
bigger, more active community (which is still true today).


More information about the Haskell-Cafe mailing list