[m-rev.] field syntax (was: smart recompilation)

David Overton dmo at cs.mu.OZ.AU
Tue Jul 3 23:48:54 AEST 2001


On Tue, Jul 03, 2001 at 11:49:12AM +1000, Tyson Dowd wrote:
> That is a round-about way of saying -- it would be nice to get rid of
> Field(Object) and just use Object ^ Field.  This way you always know
> whether a function is intended to be used as a field accessor or not.

A useful feature I've found of the current syntax is the ability to
write complex, nested function calls in a much easier to read
manner.  E.g. something like

	X1 = baz(W, bar(Z, foo(Y, X)))

can be written as

	X1 = X ^ foo(Y) ^ bar(Z) ^ baz(W)

which, IMHO, can be much easier to read.  It shows that the
programmer's intent is to  start with X and apply the three
transformations to it, in the order specified, to get X1.

Maybe you could argue that it is confusing to allow this sort of use
of the syntax.  I don't think so, but if we're going to disallow this
sort of thing with '^', some other syntax for it would be nice.


David
-- 
David Overton      Department of Computer Science & Software Engineering
PhD Student        The University of Melbourne, Victoria 3010, Australia
+61 3 8344 9159    http://www.cs.mu.oz.au/~dmo
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list