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

Ralph Becket rbeck at microsoft.com
Thu Jul 5 19:31:45 AEST 2001


> From: Tyson Dowd [mailto:trd at cs.mu.OZ.AU]
> Sent: 05 July 2001 10:19
> 
> However, the current Mercury language already supports code where the
> spelling of a function name affects the source -- setter functions are
> distinguished based on spelling.
> 
> If you really want to argue your point, you should instead be
> arguing that putting := into the name of setter functions is broken.
> This is akin to the case with FORTRAN or BASIC.
> 
> I would prefer to fix it by spelling *both* setters and getters
> in a special way.

Another option is not to adjust the names of setters either and just
use arity overloading.

The problem here is that this is more than a coding standards issue:
opinions seem to be split 50/50 between "fields are special things
and the field syntax should be reserved for that use only" and "fields
are just boilerplate for access/update functions and the syntax for
using them is legitimately more widely applicable".

I suspect that had the (^) transformation been added before fields
were considered then this debate might not have arisen.

- 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