[m-dev.] Foreign type compare and unification

Peter Schachte schachte at cs.mu.OZ.AU
Tue May 21 09:44:01 AEST 2002


On Tue, May 21, 2002 at 08:46:43AM +1000, Tyson Dowd wrote:
> On 19-May-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > My point is that the typeclass approach with the deriving annotation from
> > Haskell does *not* seem to be the most elegant approach to me.  Because the
> > list of such classes is fixed and not extensible, it seems rather inelegant.
> 
> I still don't see your point (nor do I agree about inextensibility
> implying inelegance but it hardly matters). 

FWIW, I think simplicity and generality, in that order, are the key
attributes of elegance.  If a simple scheme will allow users to define
their own classes to which all types belong, but which allow default
methods to be overridden, I think that would be more elegant than a
fixed list.

But leave elegance aside.  If users can't declare their own such
classes, it will be very important to get the list of such classes,
and the interfaces of their methods, exactly right; if they can, usrs
can always write another library module adding or extending another
such class.


-- 
Peter Schachte              He that waiteth for all men to be satisfied with
schachte at cs.mu.OZ.AU        his plan, let him seek eternal life, for he
www.cs.mu.oz.au/~schachte/  shall need it.
Phone: +61 3 8344 9166          -- Mark Twain 
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list