[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] MzScheme and multiple inheritance??



Hi Matthias,
thank you for the explanation!
Would you, please, point me to some documents which describe MzScheme mixins and
units in some more details than can be found in MzScheme manual.
I come from C/C++ background and these concepts are new to me. 

Thanks,
--Leo

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+  Leonid Razoumov,               +  E-mail: lrazoumov@qualcomm.com   +
+  Qualcomm Inc.,                 +  http://www.qualcomm.com          +
+  5775 Morehouse Drive,          +                                   +
+  San Diego, CA 92121-1714,      +  VOICE:  +1-858/651-5163          +
+        USA                      +    FAX:  +1-858/658-2113          +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


>>>>> "MF" == Matthias Felleisen <matthias@cs.rice.edu> writes:

    MF> Leo, mzscheme's classes aren't classes. They are mixins.
    MF> The keyword is misleading, and we should warn people in 
    MF> the manual about this "misperception." 

    MF> A mixin is like a class but the super-class specification 
    MF> is an expression, not a hard-wired name. Thus you can write
    MF> functions that consume classes and produce them: 

    MF> (define (add-search-buffer-to-window a-window-class)
    MF>   (class a-window-class ... ....))

    MF> This is probably the most common use of the super-class expression. 
    MF> Another one is that you can write modules (known as "units") and 
    MF> inherit across module boundaries -- without knowledge to which module
    MF> you're going to link yours. 

    MF> We have written that "mixins give you the simplicity of single-inheritance
    MF> thinking and the power of multiple inheritance" and we believe in this. If
    MF> someone runs across a situation where MI is needed instead of Mixin we'd
    MF> like to know. 

    MF> -- Matthias