[m-dev.] Re: proposal: user-defined equality predicates

Peter Schachte pets at cs.mu.oz.au
Mon Jun 30 12:37:14 AEST 1997


On Fri, 27 Jun 1997, Zoltan Somogyi wrote:

> > (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 wasn't talking about implied modes for user-defined =/2, I was talking
about implied modes for any predicate.

Let me rephrase:  Why should implied modes of (exported) predicates in
argument positions such types be disallowed? 

Ok, I'll try again.  Given the declaration:

	:- mode set__union(in, in, out) is det.

Why shouldn't this be allowed:

	set__union(S1, S2, S),
	set__union(S2, S1, S)

but instead the following be required:

	set__union(S1, S2, Sa),
	set__union(S2, S1, Sb),
	set__equal(Sa, Sb)?


-Peter Schachte      URL:  http://www.cs.mu.oz.au/~pets/
pets at cs.mu.OZ.AU     PGP:  finger pets at 128.250.37.150 for key
    [A computer is] like an Old Testament god, with a lot of rules
    and no mercy.  -- Joseph Campbell




More information about the developers mailing list