Common Lisp the Language, 2nd Edition


next up previous contents index
Next: Initialization Arguments Up: Programmer Interface Concepts Previous: Standard Meta-objects

28.1.9. Object Creation and Initialization

change_begin
The generic function make-instance creates and returns a new instance of a class. The first argument is a class or the name of a class, and the remaining arguments form an initialization argument list.

The initialization of a new instance consists of several distinct steps, including the following: combining the explicitly supplied initialization arguments with default values for the unsupplied initialization arguments, checking the validity of the initialization arguments, allocating storage for the instance, filling slots with values, and executing user-supplied methods that perform additional initialization. Each step of make-instance is implemented by a generic function to provide a mechanism for customizing that step. In addition, make-instance is itself a generic function and thus also can be customized.

The Object System specifies system-supplied primary methods for each step and thus specifies a well-defined standard behavior for the entire initialization process. The standard behavior provides four simple mechanisms for controlling initialization:


change_end




next up previous contents index
Next: Initialization Arguments Up: Programmer Interface Concepts Previous: Standard Meta-objects


AI.Repository@cs.cmu.edu