9 Sealing
If a generic function is sealed then no additional methods other than those explicitly known in the same library may be added to the generic function. Thus, it is an error to define a method for a sealed generic function in some library other than the one which defined the sealed generic function, or to apply add-method
or remove-method
to a sealed generic function. An open generic function does not prohibit these operations.
When explicitly defining a generic function, the default is for the generic function to be sealed. It can be declared to be open by using the open
adjective in the generic function definition. A generic function that has no explicit definition but has an implicit definition provided by explicit definitions of generic function methods or slot accessors is also sealed. A generic function created using make
of <generic-function>
is open. There is no specified way to create a sealed generic function using make.
Additional restrictions on the ability to add methods to a generic function may be imposed by define inert domain
.
Generated with Harlequin WebMaker