CLCS

Defining Classes

The macro defclass is used to define a new named class.

The definition of a class includes:

The slot options and class options of the defclass form provide mechanisms for the following:

  • Supplying a default initial value form for a given slot.

  • Requesting that methods for generic functions be automatically generated for reading or writing slots.

  • Controlling whether a given slot is shared by all instances of the class or whether each instance of the class has its own slot.

  • Supplying a set of initialization arguments and initialization argument defaults to be used in instance creation.

  • Indicating that the metaclass is to be other than the default. The :metaclass option is reserved for future use; an implementation can be extended to make use of the :metaclass option.

  • Indicating the expected type for the value stored in the slot.

  • Indicating the documentation string for the slot.

Backlinks

Classes