Chapter 4

class100.ss: Version-100-Style Classes

The class100, class100*, and class100*/names forms provide a syntax close to that of class, class*, and class*/names in MzScheme versions 100 through 103, but with the semantics of the current class.ss system (see Chapter 3).

The class100*/names form creates a new class:

(class100*/names local-names superclass-expr (interface-expr ···) initialization-variables
  class100-clause
  ···)

local-names is
  (this-variable super-make-object-variable) 

initialization-variables is one of
  variable
  (variable ··· variable-with-default ···) 
  (variable ··· variable-with-default ··· . variable) 

variable-with-default is
  (variable default-value-expr) 

class100-clause is one of
  (sequence expr ···) 
  (public public-method-declaration ···) 
  (override public-method-declaration ···) 
  (private private-method-declaration ···) 
  (private-field private-var-declaration ···) 
  (inherit inherit-method-declaration ···) 
  (rename rename-method-declaration ···) 

public-method-declaration is one of 
  ((internal-variable external-variable) method-procedure)
  (variable method-procedure)

private-method-declaration is one of 
  (variable method-procedure)

private-var-declaration is one of 
  (variable initial-value-expr)
  (variable)
  variable 

inherit-method-declaration is one of
  variable
  (internal-instance-variable external-inherited-variable)

rename-method-declaration is
  (internal-variable external-variable)

The class100* macro avoids specifying local-names:

(class100* superclass-expr (interface-expr ···) initialization-variables
    class100-clause
    ···)

The class100 macro omits both local-names and the interface-exprs:

(class100 superclass-expr initialization-variables
    class100-clause
    ···)

(class100-asi superclass instance-variable-clause ···)      SYNTAX

Like class100, but the initialization arguments are automatically passed on to the superclass initialization procedure.

(class100*-asi superclass interfaces instance-variable-clause ···)      SYNTAX

Like class100*, but the initialization arguments are automatically passed on to the superclass initialization procedure.