Robert A. Uhl

Scheme vs. Common Lisp

Many years ago I started to get into Scheme, an academic programming language which was supposed to become the official language of the GNU Project; it was this which drew me to it. After all, if the GNU Project would be using it everywhere, then it’d serve me well to learn it ASAP.

Scheme’s an interesting member of the Lisp family; code is represented as a list which may itself be manipulated. A simple Scheme function to add two numbers and divide by a third might look like:

(define (f x y z) (/ (+ x y) z))

It’s a Lisp-1, which means that in the example above the function f is in the same namespace as the variable x et. al.

Anyway, Scheme seemed pretty cool, very clean and idealised. I’d also heard of Common Lisp, but what I’d heard was that it was old, clunky and big — that I should stick with Scheme because it was small & clean. But I found that I was never really able to use Guile for doing any real work: it’s not compiled, but simply interpreted (this means that it’s very slow); there’re not a lot of libraries for it and so forth.

Then I saw a Slashdot article about a new book, Practical Common Lisp. It sounded interesting, so I picked up a copy.

It was utterly amazing! I’d no idea that a programming language could do the things it could do. Yes, it’s a much larger language than Scheme — but the extra pieces the Common Lisp standard specifies are the extra bits that every Scheme implementation has to invent on its own, usually incompatibly.

So I’ve been working with Common Lisp for about a year now and I couldn’t be happier. I’m actually getting work done and programming is as fun as it was when I was a kid mucking about with HyperCard, which was my introduction to the world of programming.