[m-dev.] Foreign type compare and unification
Fergus Henderson
fjh at cs.mu.OZ.AU
Mon May 13 17:34:12 AEST 2002
On 12-May-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
>
> Is there any reason why we have user-defined equality but not
> user-defined comparison? Not having user-defined comparison
> makes it difficult to use data types such as cords (strings
> represented as trees for constant-time append).
One reason is that although it makes sense to special-case equality
in a logic programming language, the argument for special-casing
comparison is much weaker.
User-defined comparison is still not a complete solution to the problem.
You also need user-defined io__print, for example.
It would be nicer to devise a solution that doesn't single out
comparison, but would work equally well for hashing, printing, etc.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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