The Haskell Language

Why I learned Haskell..

Higher level programming languages can write the same program using less lines of code. Programmers can think/code the same number of lines of code in any language. As a result, if you use a higher level programming language, you'll save time. The number of bugs in a program is proportionate to the number of lines of code, so a shorter program has less bugs. Plus, some language features prevent certain types of bugs. Programs written in a higher level programming language have less bugs than if they were written in a lower level language. Haskell is the highest level programming language that I've run into, and I see shorter programs and less bugs as a result. As a must-read list, I recommend these:
  1. Beating the Averages - check out his other essays too sometime
  2. A good summary/brief into to Haskell
  3. Why Functional Programming?
  4. Yet Another Haskell Tutorial - if you decide you want to learn the language
  5. Template Haskell - gives you most of the power of Lisp macros in an easy format

More Info

Here are some Haskell programming resources:
  1. The main Haskell web site. If you're new to Haskell, check out the short intro - very well written.
  2. Check out this intro to Haskell by Hal Daumé - it's more of a 200 page textbook, and it does a really good job of explaining things. Too bad I didn't get a copy of this first, but now you'll know better! Download it now before he publishes it...
  3. My intro to fixpoint operations - note: not an intro to Haskell, but an answer to some "tricky" parts of Paul Hudak's book "The Haskell School of Expression", which is not quite as good as the intro above, but still quite excellent.
  4. I surprised myself by solving the "8 Queens" problem in 4 (!) lines of code in Haskell (plus 2 more to convert it to ASCII art and print it out). And it's really fast, too! (about 0.08 sec on a P2 400 MHz with the Glasgow Haskell Compiler) I did this while submitting some programs to compare languages. In particular, notice how much longer and less readable the solutions are in the other languages. To try to explain it better, I put up a description of the algorithm and an expanded Haskell version. Please note that the shorter version is what I originally wrote, and the expanded version was written only as a teaching tool.

Valid XHTML 1.0 Transitional