[mercury-users] this appears to be a mixin

Terrence Brannon tmbranno at oracle.com
Wed Jul 11 03:39:33 AEST 2001


Ralph Becket writes:
 : Either way, type classes don't provide implementation
 : inheritance.

I got my understanding of mixins from reading a book on a language
called Ruby. Basically a version of Perl that is completeley
object-oriented. 

What I learned there was that a collection of methods which could be
added to any number of classes was a mixin... in other words it
mixes-in some functionality to a class, without having been
implemented directly in that class. This distance() method can be
added to any class which is of type point or inherits from type
point.. Therefore it can be mixed into any of those classes to add
more functionality.

And now that I think about it, I guess you are right, there may be
some overlap in the terms mixin and and interface... maybe it's time
to head on over to CETUS links.

--------------------------------------------------------------------------
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