If an invalid initarg is used an appropriate error message is generated:
? (make-instance 'ship :x 5 :y 7 :z 9)
> Error: :Z is an invalid initarg to INITIALIZE-INSTANCE for
>#<STANDARD-CLASS SHIP>.
> Valid initargs: #(:Y :X).
> While executing: CCL::CHECK-INITARGS
> Type Command-. to abort.
See the Restarts menu item for further choices.
1 >
The example demonstrates that initargs (keywords) need not be associated with
slots but can be declared with methods (for initialize-instance).
rm
[ Sorry if you receive multiple copies of this message ]