[mercury-users] this appears to be a mixin

Ralph Becket rbeck at microsoft.com
Tue Jul 10 23:17:58 AEST 2001


> From: Dave Slutzkin [mailto:dave_slutzkin at yahoo.com]
> Sent: 10 July 2001 13:42
> 
> A mixin is in fact, AFAIK, a base class that provides
> all the functionality (methods and data) for a child
> class - the class does not (should not) override the
> methods itself.  A mixin provides functionality that
> is exactly similar in many different classes, by
> providing each class with these methods.  The classes
> know nothing about this functionality and do not need
> to know anything about it.  Then other classes that
> access the mixin functionality need only know that the
> class is derived from the mixin.

Searching the web I've come up with about three different
notions of mixin class and several seemingly garbled
attempts at explanation...

One of the clearer descriptions suggesting mixin classes
provide functionality can be found at
http://www.csis.pace.edu/~bergin/patterns/multipleinheritance.html

However, this page suggests that they're more like interfaces:
http://www.devx.com/free/mgznarch/vcdj/1998/augmag98/mixin1.asp

Either way, type classes don't provide implementation
inheritance.

- Ralph 
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list