[m-dev.] Re: proposal: user-defined equality predicates
Zoltan Somogyi
zs at cs.mu.oz.au
Fri Jun 27 15:20:53 AEST 1997
> I guess this is where we differ. To me, =/2 should mean "equal." (Read
> that sentence aloud.) It would be unacceptable to everyone, I assume, if
> every type was required to define its own equality predictate (and it
> couldn't be called =/2). So why should we require this of types whose
> only sin is that the mapping from a term to its meaning is not injective
> (one-to-one)? Why should implied modes of such types be disallowed? It
> makes the language quirky.
Implied modes should only be required in code that deals with the
representation of the type. I don't see *any* good reason for the
representation of a type with a non-standard equality predicate
to be exported from its defining module. I am even very doubtful
about whether the code in the defining module needs implied modes of =
for such types.
Zoltan.
More information about the developers
mailing list