[mercury-users] Pred defns
rwab1 at cam.sri.com
Fri Apr 3 02:42:24 AEST 1998
Fergus Henderson wrote on 3 Apr:
> Almost, but not quite.
> The problem is that the quantification of the variable is not right.
I'm getting more and more uncomfortable about all this. It seems to
me our goals are not happy in bed together:
Improve Code Clarity
- make use of multiple accumultators easier by making the
threading implicit in the source code;
- make code easier to read by making input/output accumulator
arguments implicit in some way.
Retain Clear Denotational Semantics of Source Code
- err, add more syntax in the form of various quantifiers
and that last point, it seems to me, is replacing one grind (too many
explicit arguments) with another.
I'm going to go out on a limb here and may get (justifiably) shot down
in flames, but... why don't we bite the bullet and accept that bits of
source code written in this style will not be syntactically identical
with its FOL denotation?
The point of the syntactic transformation is that you are just adding
syntactic sugar - you aren't changing the language in any real sense.
The compiler still gets to play all its jolly rearrangement games.
The trick is to add just enough and no more that it's obvious to all
and sundry who are in on the deal what a piece of code is doing.
p.s. It's been a long day, so if the above is sick sick sick then
please go easy on me.
Ralph Becket | rwab1 at cam.sri.com | http://www.cam.sri.com/people/becket.html
More information about the users