Scheme and Common Lisp

I’ve been using Scheme and Common Lisp almost exclusively for over 10 years. During that time, I tended to favor Scheme because I liked its clean design and simplicity, the named let, continuations, and the simplicity that being a Lisp-1 brought. As I posted recently, Guile Scheme is broken on OS X Lion. It’s still broken and as a result I have been using Common Lisp exclusively.

That has forced me to understand Common Lisp better and to become a more proficient Lisp programmer. At this point, I’m ready to say goodbye to Scheme. Common Lisp doesn’t have as simple a design but it is much more powerful. It’s easy to implement the named let functionality with a macro (see LoL for an implementation) and as Doug Hoyte argues in Let Over Lambda, Lisp-2 is arguably better than Lisp-1. I’m not yet convinced of that last statement but using CL exclusively for the last month has made the difference fade into the background. That leaves only continuations. They’re certainly powerful but CL provides a way of doing everything I used them for.

One huge advantage of Common Lisp is that it’s standardized in a way that Scheme isn’t. I recently changed from Clozure CL to SBCL and I haven’t had to make any code changes. It’s very hard to do the same thing is Scheme. When I changed from Dr. Scheme (now Dr. Racket) to Guile I had to rewrite a lot of code. That carries over to libraries. It was pretty hard to find libraries that worked with any Scheme and although there are certainly CL libraries that use non standard features of a certain implementation and are not as a result portable, most libraries work just fine with any Lisp. Notable exceptions are things, like networking, that are not part of the standard. But even there, Zack Beane shows a very nice way of handling the differences with his Quicklisp implementation.

Finally, there’s a subtle difference in the feel of the two languages. CL seems to give me more power to solve problems. Thus, although I was a little annoyed that Guile won’t build under Lion (I know, it’s free and the code is there to fix), in retrospect, I think it was actually a good thing. It has made me reconnect strongly with my first Lisp and that’s working out very well for me.

This entry was posted in Programming and tagged , . Bookmark the permalink.