class100.ss: Version-100-Style Classes

To load: (require (lib "class100.ss"))

The class100 and class100* forms provide a syntax close to that of class and class* in MzScheme versions 100 through 103, but with the semantics of the current class.ss system (see Chapter 6). For a class defined with class100, keyword-based initialization arguments can be propagated to the superclass, but by-position arguments are not (i.e., the expansion of class100 to class always includes an init-rest clause).

The class100 form uses keywords (e.g., public) that are defined by the class library, so typically class.ss must be imported into any context that imports class100.ss.

The class100* form creates a new class:

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

initialization-ids 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 ···) 
  (augment public-method-declaration ···) 
  (pubment public-method-declaration ···) 
  (overment public-method-declaration ···) 
  (augride 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-id external-id) method-procedure)
  (identifier method-procedure)

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

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

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

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

In local-names, if super-instantiate-id is not provided, the instantiate-like superclass initialization form will not be available in the class100*/names body.

The class100 macro omits the interface-exprs:

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

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

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

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

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

(super-init init-arg-expr ···)      SYNTAX

An alias for super-make-object in class.ss.