|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
A class is a first-class object in Gauche and you can create it on the fly at run-time using procedure calls. However, for convenience, a macro is defined to create a class and bind it globally.
Supers is a list of direct superclasses from which this class inherits. You can use multiple inheritance. See 7.2.1 Multiple inheritance below, for the rule that determines precedence of inheritance chain.
Slot-spec is a specification of a "slot", sometimes known as a "field" or an "instance variable" (but you can specify "class variable" in slot-spec as well). The simplest form of slot-spec is just a symbol, which names the slot. Or you can give a list, whose first element is a symbol and whose rest is an interleaved list of keywords and values. The list form not only defines a name of the slot but specifies behavior of the slot. See 7.2.2 Slot specification, for details.
Finally, option ... is an interleaved list of keywords
and values, specifies how class object should be created.
This macro recognizes one keyword,
corresponding value is used for metaclass (class that instantiates
another class). Other options are passed to the
method to create the class object. See section 7.6.3 Class instantiation,
for the usage of metaclass.