Copyright © 2003-2005, Peter Seibel

20. The Special Operators

In a way, the most impressive aspect of the condition system covered in the previous chapter is that if it wasn’t already part of the language, it could be written entirely as a user-level library. This is possible because Common Lisp’s special operators—while none touches directly on signaling or handling conditions—provide enough access to the underlying machinery of the language to be able to do things such as control the unwinding of the stack.

In previous chapters I’ve discussed the most frequently used special operators, but it’s worth being familiar with the others for two reasons. First, some of the infrequently used special operators are used infrequently simply because whatever need they address doesn’t arise that often. It’s good to be familiar with these special operators so when one of them is called for, you’ll at least know it exists. Second, because the 25 special operators—along with the basic rule for evaluating function calls and the built-in data types—provide the foundation for the rest of the language, a passing familiarity with them will help you understand how the language works.

In this chapter, I’ll discuss all the special operators, some briefly and some at length, so you can see how they fit together. I’ll point out which ones you can expect to use directly in your own code, which ones serve as the basis for other constructs that you use all the time, and which ones you’ll rarely use directly but which can be handy in macro-generated code.