Next: , Previous: , Up: The Universe Known as LISP   [Contents][Index]


1 Common Lisp Implementations

Common Lisp comes in many different flavors, or implementations. You have to choose a Lisp implementation. This may seem like a strange thing to have to do for folks used to languages such as Perl, Python, Visual Basic, C#, and Java.

The difference is that Common Lisp is defined by its standard—there is neither a single implementation controlled by a benevolent dictator, as with Perl and Python, nor a canonical implementation controlled by a single company, as with VB, C#, and Java. Anyone who wants to read the standard and implement the language is free to do so.

Changes to the standard have to be made in accordance with a process controlled by the standards body American National Standards Institute (ANSI). That process is designed to keep any one entity, such as a single vendor, from being able to arbitrarily change the standard. Thus, the Common Lisp standard is a contract between any Common Lisp vendor and Common Lisp programmers. The contract tells you that if you write a program that uses the features of the language the way they’re described in the standard, you can count on your program behaving the same in any conforming implementation.

On the other hand, the standard may not cover everything you may want to do in your programs—some things were intentionally left unspecified in order to allow continuing experimentation by implementers in areas where there wasn’t consensus about the best way for the language to support certain features. So every implementation offers some features above and beyond what’s specified in the standard. Depending on what kind of programming you’re going to be doing, it may make sense to just pick one implementation that has the extra features you need and use that. On the other hand, if we’re delivering Lisp source to be used by others, such as libraries, you’ll want–as far as possible–to write portable Common Lisp. For writing code that should be mostly portable but that needs facilities not defined by the standard, Common Lisp provides a flexible way to write code "conditionalized" on the features available in a particular implementation.

If you are looking for an open-source implementation, you have several options.

Slime ("Superior Lisp Interaction Mode for Emacs") will smooth out some of the differences between implementations by providing a common interface for interacting with Lisp. Slime lets you interact with Lisp both via the REPL and while editing source files. Slime will let you evaluate or compile both individual expressions and whole files directly from your editor.


Next: Common Lisp Ecosystem, Previous: Introduction to Lisp, Up: The Universe Known as LISP   [Contents][Index]