From: Matthew Flatt <>
Date: Fri, 16 Mar 2001 12:03:24 -0700 (MST)
Subject: 199.4

The v200-tagged code in CVS for MzScheme and MrEd is now version 199.4.
The main change is the new class system in MzLib’s "" library.

Over the last few years, we have experimented with a class system that
supports only "instance variables" in objects. Methods were implemented
as closure-valued instance variables. This approach has proven to be
too expensive for many applications, so we’ve decided to move to a more
conventional implementation of methods for space efficiency. Other
benefits of the new class system include keyword-based initialization
arguments and final methods.

Below is a brief description of the change. For details, consult the
temporary docs at



   Classes now have fields and methods, and the form of a method
   definition is syntactically restricted (so that it can be
   implemented with a per-class procedure instead of a per-object

   Syntactically, the new `class’ form is substantially different from
   the old `class’ form. The new form is more consistent with the
   `unit’ and `module’ syntax, using `define’ for method and private
   field declarations.

   The "" library in MzLib supplies a `class100’ form with a
   syntax similar to the old `class’ form, but with a semantics that
   matches the new `class’ form.

   To make old code work with the new class system:

      0. Require the "" and "" libraries.

      1. Replace "class" with "class100" (and "class*" with
         "class100*", etc.).

      2. Replace "private" with "private-field".

      3. Loop until there are no more syntax errors:
         - Try to load the code
         - Read the error message (which provides a source location)
         - Fix the problem

   The `send’ form works as before, but there is no `ivar’ form.
   Field values are accessed through procedures constructed with
   `make-class-field-accessor’. See the MzLib documentation for

   The "" library in MzLib implements precisely the old
   MzScheme class syntax, but it cannot be used with MrEd classes.