Objects are created with the make-object procedure:
(make-object class init-arg )
The init-arg values are passed as initialization arguments, bound to the initialization variables of class for the newly created object. If class is not a class, the exn:application:type exception is raised.
All instance variables in the newly created object are initially bound to the special undefined value (see section 4.1). Initialization variables with default value expressions (and no provided value) are also initialized to undefined. After values are assigned to the initialization variables, default value expressions are evaluated for un-assigned initialization variables, and then the initial value expressions and sequence expressions are evaluated. The expressions are evaluated sequentially from left to right, but the enviornment for every expression includes all of the class's variables.
Sometime during the evaluation of these expressions,
superclass-declared instance variables must be initialized (once) by
calling the procedure bound to super-init-variable:
(super-init-variable super-init-arg )
The super-init-args are bound to the superclass's initialization
variables, following the instance variable initialization process
recursively until variables from all of the ancestor classes are
initialized.
Instance variables inherited from a superclass will not be initialized until the superclass's initialization procedure is invoked. Note that a variable declared with inherit may actually have a value before the superclass's initialization procedure is invoked, because inherited variables can be overridden. However, the value of a rename variable is always undefined before the superclass's initialization procedure is invoked.
It is an error to reach the end of initialization for any class in the hierarchy without invoking the superclasses initialization procedure (unless the superclass is the ``null class''); exn:object:init:never exception is raised in this case. If a superclass initialization procedure is invoked more than once, the exn:object:init:multi exception is raised.