VocabularyrolesSyntaxROLE: name slots... ;
ROLE: name < role slots... ;
ROLE: name <{ roles... } slots... ;
Word descriptionDefines a new
role.
tuple classes which inherit this role will contain the specified
slots as well as the slots associated with the optional inherited
roles.
Slot specifiers take one of the following three forms:
• | name - a slot which can hold any object, with no attributes |
• | { name attributes... } - a slot which can hold any object, with optional attributes |
• | { name class attributes... } - a slot specialized to a specific class, with optional attributes |
Slot attributes are lists of slot attribute specifiers followed by values; a slot attribute specifier is one of
initial: or
read-only. See
Tuple slot declarations for details.
See alsoROLE-TUPLE:Definition