The framework relies heavily on mixins. A mixin is a class parameterization modeled on a paper published by Flatt, Felleisen, and Krishnamurthi, available at http://www.cs.rice.edu/CS/PLT/Publications/#ffk-pldi97. The implementation of these mixins in MzScheme is with the combination of lambda and class. The framework provides a macro to simplify the checking and implementation of these mixins. It's syntax is very similar to the syntax for class. The shape of a mixin is:
(mixin (interface-expr ...) (interface-expr ...) initialization-variables
instance-variable-clause ...)
This macro expands into a procedure that accepts a class. The argument passed to this procedure must match the interfaces of the first interface-exprs expressions. The procedure returns a class that is derived from its argument. This result class must match the interfaces specified in the second interface-exprs section; it has initialization arguments specified by initialization-arguments and clauses specified by instance-variable-clauses. The syntax of the initialization-variables and instance-variable-clause are exactly the same as class*/names.
The mixin macro does some checking to be sure that variables that the
instance-variable-clauses refer to in their super class are in the
interfaces. That checking and the checking that the input class matches the
declared interfaces aside, the mixin macro's expansion is something
like this:
(mixin (i<%> ...) (j<%>...) args
clause ...)
=
(lambda (%)
(class* % (j<%> ...) args
clause ...))
The mixin macro is provided by
(require-library "macro.ss" "framework")
.