[m-dev.] Re: proposal: user-defined equality predicates
Thomas Charles CONWAY
conway at cs.mu.oz.au
Mon Jun 30 09:32:25 AEST 1997
Fergus Henderson, you write:
> Andrew Bromage, you wrote:
> > > My rationale for wanting this is that non-canonical types don't work in
> > > Mercury (or any other logic programming language I know of). Fergus'
> > > set-as-unordered-list example illustrates it quite well.
> >
> > I understand why implementing sets as unordered lists and defining
> > equality on them in a nice way is a good idea. However I think that
> > it is incorrect to overload =/2 in this way. What I think would be
> > better is to handle this in type classes...
>
> (Terminology nit: we're not really overloading =/2. We're just defining
> its semantics when applied to different types.)
>
Terminology nit nit: we're not just defining its semantics applied to
different types. We're defining its semantics when applied to some modes
of unification for different types.
--
ZZ:wq!
^X^C
Thomas Conway conway at cs.mu.oz.au
AD DEUM ET VINUM Every sword has two edges.
More information about the developers
mailing list