The first thing to realize about the Common Lisp Object System (and LISP) is that many things that are very much behind the scenes in other languages are availab le as user-accessible data objects in CLOS. For example, in C++, only the compiler has any data structures that correspond to user-defined classes. In CLOS, user-defined classes are represented by objects -- class objects -- that can be examined and manipulated by user programs. This property is sometimes called "introspection."

When you create a class you get a class object back:

(defclass rectangle () ((height :initform 0.0 :initarg :height) (width :initform 0.0 :initarg :width))) #<Standard-Class F00>

The exact contents of the class object depend on the implementation of CLOS.

CLOS was designed in layers. The outermost layer (the one that programmers will typically use) contains the syntax of CLOS, defined by macros and functions such as defclass and defmethod. This layer is called the "user interface layer", but it isn't a user interface in the keyboard, mouse, window, graphics sense; it's a use interface to the operational part of the CLOS language. This user interface corresponds to language definition in other programming languages.

The next lower layer is the connection layer, and it is implemented by functions. The user interface macros expand to calls to function s in this layer; in addition, this layer contains functions that map names to metaobjects. For example, find-class is a function in this layer. The deepest layer is the metaobject layer. Metaobjects are first-class LISP objects that provide the behavior of classes, instances, slot access, generic functions, inheritance, and method combination.

One way to understand this layering is by analogy to cars. You can think of cars as having three layers just like CLOS. The outermost layer is almost like a user interface. This layer is basically all the controls (gas pedal, steering wheel, brakes). The driver interact s with these controls to make his car do things.

The next layer connects the controls to the things controlled. The gas pedal is connected by rods, levers, and springs to the carburetor. The function of this layer is to connect a device designed for easy human use to a device designed to accomplish its function readily. This is like the connection layer.

The deepest layer is the set of devices that make a car perform its function. For example, the carburetor controls the speed of the car by controlling the amount and rate of fuel burned. This is like the metaobject layer.

Changing the way a driver interacts with the car can simply involve the user interface layer; for example, if you want to change the sha pe of the gas pedal or slightly change its placement. For a larger change (such as implementing the gas pedal as a roller on the steering wheel), the interface and connection layer must be changed; that is, a new linkage must be designed and built as well as changing the gas pedal itself.

Finally, the nature of the car itself can be changed by changing the lowest layer. The engine can be replaced with a much more powerful one for amateur racing or trailer pulling. The suspension can be altered to make a road racing car. The back seats and rear sections can be altered to form a pickup truck. The body and undermachinery can be enclosed in a waterproof shell and a propeller added to create an amphibious vehicle. Some of these alterations require changing or a dding things to the connection and user interface layers, but the fundamental nature of the car cannot be changed without changing the deepest layer.

Some changes are just not possible unless the car is thrown away and a new design produced. An Indy car cannot be made from a stock model, no matter how much customization you do. Neither can you create an airplane from a car.