[m-dev.] Re: proposal: user-defined equality predicates
Fergus Henderson
fjh at cs.mu.oz.au
Mon Jun 30 14:34:07 AEST 1997
Thomas Charles CONWAY, you wrote:
> 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.
Well, the declarative semantics is the same for all modes.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list