Scheme or Common Lisp

common-lispscheme

For a school project (a free choice project), I was planning on working my way through SICP(Structure and Interpretation of Computer Programs) and learning Scheme. After that I want to create something interesting with it (also part of this project). However, from what I've read, Scheme might not be the best dialect to use for a project and it might instead be better to use Common Lisp. (https://stackoverflow.com/questions/108201/common-lisp-or-scheme). However, that would mean I could not use SICP to learn it?

I also considered the option of first learning Scheme and then Common Lisp, but apparently there are some 'subtle' difference which could be very hindering.

What would be the best choice? Simply learn Scheme and use it? Learn Scheme and then learn Common Lisp? Or skip Scheme (and SICP) and simply learn Common Lisp? Or is there an ever better option?

Best Answer

The differences between Common Lisp and Scheme are over-rated. They are there, and some are important, but for actual work you will not have any trouble learning one and then the other. When I was commonly writing both, I could switch between them with no problems.

If you plan to start with SICP, then I would start learning Scheme. If you plan to start with your project and decide that you need Common Lisp for it, then I would start learning Common Lisp. Learning the second dialect is very easy after that.


There are a couple of things to consider. The type of project is most important: Scheme is excellent for language design projects. If your project is an interpreter/compiler/parser/etc for a new, weird kind of language (or just language feature), then Scheme is ideal. On the other hand, Common Lisp is very powerful in areas where you need a lot of basic utilities already built-in, but don't know precisely what it is you are building ahead of time--you end up with a DSL most of the time. That's why it was so popular in artificial intelligence. (That's the kind of code that I used it for.)

Second is that PLT has a low-learning-curve Scheme IDE called DrScheme. Common Lisp has a high-learning-curve Emacs plugin called Slime. In my experience, Slime is more powerful, but there is enough learning required that you should probably take it into account if this is a semester-long project (especially if you don't already use Emacs).

Related Topic