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

Ralph Becket rbeck at microsoft.com
Wed Jul 4 00:05:39 AEST 2001


> From: David Overton [mailto:dmo at cs.mu.OZ.AU]
> Sent: 03 July 2001 14:49
>
> 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.

The thing I do like about the current argument odering scheme is
that (^) for field access can be described in terms of reverse 
function composition - under that interpretation your first line 
seems perfectly respectable to me.  I find it much harder to parse 
the common Haskell idiom of composing half a dozen functions on a 
line in the traditional order.

- Ralph
--------------------------------------------------------------------------
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