[mercury-users] Pred defns
Ralph Becket
rwab1 at cam.sri.com
Tue Mar 31 20:34:55 AEST 1998
Fergus Henderson wrote on 31 Mar:
>
> Yes, indeed. And thank you for your proposal, I do think it is quite nice.
> I'm just trying to make it a bit more "O'Keefe-proof" ;-)
Let's just settle for flame retardant!
> I think Richard O'Keefe is right to object to the use of the same
> notation (capital letters) for two quite difference concepts
> (accumulators and logic variables).
Fair enough. My personal preference is to introduce as little new
syntax as possible. I may be coming round to the idea that named
accumulators a la EDCGs may be a good thing after all...
:- pred p(...) + [a:type1, ..., io:io__thread].
:- mode p(...) is something.
p(...) :-
print("The answer to ") + [io],
print($a) + [io],
$a := $a + 1,
print(" + 1 is ") + [io],
print($a),
...
Naaah. This looks really gross. I prefer the simpler notation after
all.
>
> > A suggestion: why not decide upon a notation (if this proposal has
> > support) and provide a preprocessor.
>
> By the way, if anyone wants to have a go at this, the file
> `samples/expand_term.m' is a good place to start.
Anyone got a student with nothing to do?
--
Ralph Becket | rwab1 at cam.sri.com | http://www.cam.sri.com/people/becket.html
More information about the users
mailing list