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

Tyson Dowd trd at cs.mu.OZ.AU
Thu Jul 5 19:42:35 AEST 2001


On 05-Jul-2001, Ralph Becket <rbeck at microsoft.com> wrote:
> > 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.

Yes, but this gives you even *less* information!

We could just delete the whole field selection syntax section from
the documentation altogether and stop pretending we have anything other
than some function application syntax.

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

Yes.  But it wasn't and I don't think the status quo is a very
orthogonal solution, so I guess we have to have this debate now.

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
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