[mercury-users] Type inheritance?
David Glen JEFFERY
dgj at cs.mu.oz.au
Wed Sep 24 12:45:00 AEST 1997
> After a brief look at it I noticed that they also define superclasses,
> which I guess could also be used to define some kind of inheritance
> hierarchy. Is this likely to be developed for mercury?
As Fergus has already mentioned, superclasses will be part of the Mercury
I just wanted to mention that, as far as inheritance goes:
- Type classes on their own provide interface inheritance. The
"typeclass" declaration makes an abstrace interface, and the
"instance" declaration inherits that interface.
- Superclasses allow an interface to inherit an interface. It is
similar to in, say, C++ having one abstract base class inheriting
David Jeffery (dgj at cs.mu.oz.au) | Kids, you tried your best and
MEngSc student, | you failed miserably. The lesson
Department of Computer Science | is, never try.
University of Melbourne, Australia | -- Homer Simpson
More information about the users