Rediscovering Dr. Dijkstra and Giving LISP a Second Chance

It’s strange and interesting how I got to this point. I’ve been working as an ASP.Net (web) and MFC (GUI) developer. Some months ago I got a job referral from a friend. Someone needed a developer for an internet search engine they were working on, and they were looking for someone who knew Lisp, among other things. I hadn’t programmed in Lisp since college (1990), and even then I grew to hate it because the materials I was given to learn it were not good, and the teacher was bad to boot. Lisp was very foreign to me, but then I wasn’t taught what a functional programming language was (vs. an imperative one like Pascal, C, etc.). I learned that a few years later in a more advanced course. Anyway, the “help wanted” ad was intriguing. I didn’t go for the job, because I just wasn’t qualified for it.

A month or two ago Paul Murphy, a blogger at ZDNet, posted an article about Dr. Edsgar Dijkstra and how he had criticized APL. Dr. Dijkstra was frequently cited in my computer science textbooks in college. I got into an interesting discussion with folks in the Talkback section of Murphy’s article, and got curious, “What was Dijkstra’s favorite programming language?” I did a Google search and found out he didn’t have one. He didn’t even have a computer at home! Interesting. Incidently, Dr. Dijkstra died in 2002.

Along the way though I found several blog entries criticizing Java, but all had something nice to say about Lisp. I also read Paul Graham’s article on Lisp (he’s a BIG Lisp booster). He emphasized that every programmer should learn Lisp, even if you don’t end up using it. It makes you a better programmer. I was impressed with Graham’s account of ViaWeb (now Yahoo! Store), a web application he and some business partners created during the 1990s which allowed customers to build their own e-commerce sites. It was completely written in Lisp. Graham said that Lisp is simple and powerful, two words I like very much, which enabled him to stay a few steps ahead of his competition when developing ViaWeb. He also pointed out that there are airline reservation systems in use today that are partly written in Lisp. The major point he made is that Lisp is a good general-purpose programming language. It’s not just for AI or language processing projects. I got inspired. I’ve decided to give Lisp a second chance.

I got CLISP, an open source implementation of ANSI Common Lisp, and I followed the included introductory tutorial (in the doc directory of the installation). It’s much better than what I was given to learn Lisp in college. Just for the heck of it I’ve been working on a couple Lisp programming problems I was not able to completely solve in college, as an exercise in learning it. It’s been challenging and fun. I also discovered there’s an open source Lisp implementation for .Net, called DotLisp. I’ve thought a bit about programming problems I’ve had to solve on recent projects, and I’ve wondered whether using Lisp in .Net might’ve made them easier to implement. The only thing is my boss probably wouldn’t have liked me using it, since most programmers don’t know Lisp well, if at all. Using a minority language can render your code non-maintainable for all intents and purposes, no matter how well written it is in the language.

Recently I read a few comments on Lisp, saying that while it’s a good language, it’s not necessarily the best one for real world projects. Apparently tool and library support are lacking for it, so developers are likely to be on their own with it unless they’re doing nothing more than implementing some algorithms, or doing something which happens to have library support. A few suggested Python as a substitute, since it’s popular and has many Lisp-like qualities. Perhaps Ruby (or Ruby on Rails) would substitute as well? I’ve heard Ruby on Rails is similar to Scheme, a Lisp variant. Even so, it would be neat to try mixing in some Lisp into a mostly C# project to see if it helps in solving vexing problems, beyond the typical CRUD (Create, Read, Update, Delete from a database) operations.

I found LispDoc, a small web page with excellent links to documentation sources for Common Lisp.

I’ll close with a speech of Dijkstra’s that I thought was funny because it was just so blunt: “How do we tell truths that might hurt?”, from 1975.

Edit 9/15/06: One might call his speech, “How do we tell truths that might hurt?”, “An Inconvenient Truth” for the discipline of computer science. 🙂

Edit 9/27/06: I finally found a quote I was looking for by Philip Greenspun on Lisp here:

Greenspun’s Tenth Rule:

“Any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp.”

Here are a couple more quotes on it (from the same source) from computer science luminaries:

“the greatest single programming language ever designed”
     – Alan Kay

“Lisp has jokingly been called ‘the most intelligent way to misuse a computer’. I think that description is a great compliment because it transmits the full flavor of liberation: it has assisted a number of our most gifted fellow humans in thinking previously impossible thoughts.”
     – Edsger Dijkstra, CACM, 15:10


I've brought over a couple prior posts from a homemade blog I attempted to create a couple years ago (unsuccessfully). I didn't get around to automating it, so I finally decided to bring it here. Maybe this will get me to write more often.

Feel free to comment on them.