[mercury-users] maintaining state in instances of typeclasses

Terrence Brannon princepawn at earthlink.net
Wed May 16 09:41:34 AEST 2001

Fergus Henderson writes:
 > But type classes in Mercury are not the same as classes in OOP languages.
 > In OOP languages, an instance of a class is an object.
 > In Mercury, an instance of a type class is a type.

Is inheritance of typeclasses possible?

 > In OOP languages, the class methods get passed the object
 > as an implicit parameter (`this').
 > In Mercury, all parameters must be declared and passed explicitly.

Well how about things like:

1 - SUPER - calling a method in the "superclass" of a type
2 - automatic search for a method in an inheritance hierarchy of type

I'm kinda stabbing in the dark with these questions. But my goal is to
see just how capable Mercury is in dealing with object-oriented

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