When you call make-instance, Lisp (CLOS) performs the following steps.
- Combines the initargs you supply to make-instance with the default values for any initargs you do not explicitly supply. The result is a defaulted initargs list.
- Ensures that all initargs names in the default initarg list are valid, and signal an error if they are not. If :allow-other-keys is provided as true in the call to make-instance, all initarg names are valid
- Allocates storage for the instance and creates an instance whose slots are all unbound.
- Applies the initialize-instance generic function to the newly created instance and the defaulted initarg list. The default primary method for initialize-instance does the following.
- Initializes slots according to the defaulted initarg list
- Initializes any slots that have :initforma and are still unbound.
- Returns the initialized instance
You can see the CLOS elements:
Common Lisp Object System
Back to index