Previous section: Declaring sealing of generic functions

Dylan reference manual -- The seal generic form

The seal generic form

There is also a seal generic top-level form, with the following syntax: seal generic function ( type, ... );

The function must be a module variable that refers to a generic function.

The types must be expressions that evaluate to instances of <type>. The number of types must be the same as the number of required arguments accepted by the function.

A seal generic form in a library L for a generic function G with types T1...Tn imposes the following constraints on programs:

Abbreviations for seal generic

define sealed method defines a normal method and then seals the generic function for the types that are the specializers of the method. define sealed method is a convenient abbreviation for the seal generic form.

The sealed slot option to define class defines a normal slot and then seals the getter generic function for the class, and seals the setter generic function, if there is one, on <object> and the class. The sealed slot option to define class is a convenient abbreviation for the seal generic form.

Next section: 9. Collections