Different code for different modes
Peter Schachte
pets at students.cs.mu.OZ.AU
Thu Jan 22 17:08:49 AEDT 1998
On Thu, 22 Jan 1998, Fergus Henderson wrote:
> How about the following alternative syntax?
>
> p(X::in, Y::out) :- p_1(X).
> p(X::out, Y::in) :- p_2(X).
> ...
>
Presumably you mean:
p(X::in, Y::out) :- p_1(X, Y).
p(X::out, Y::in) :- p_2(X, Y).
...
Yes, this is better still, because it doesn't require one to write p_1, p_2,
etc. in any particular way. This would be very nice.
As to presuming such preds impure, that would be acceptable, though I see
less reason to presume such a pred impure than to presume a pragma c_code
version of the same thing impure. I wouldn't want to do this terribly
often, so I could cope with promising each such pred pure if it is.
-Peter Schachte | Ultimately, there's no such thing as
pets at cs.mu.OZ.AU | "organizational behavior"; it's all behavior
http://www.cs.mu.oz.au/~pets/ | of the people in the organization.
PGP key available on request | -- Stephen Covey, et al.
More information about the developers
mailing list