[m-rev.] Re: [m-dev.] Commas considered optional

Dominique de Waleffe ddw at miscrit.be
Thu Nov 29 22:11:23 AEDT 2001


  >>> "Fergus" == Fergus Henderson <fjh at cs.mu.OZ.AU> writes:

Fergus> On 29-Nov-2001, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
>> A common topic for debate is how to improve the syntax of Mercury.
>> Possibly for the first time ever in the history of such discussions, we
>> suggest taking something out: the commas.
>> 
>> We've just conducted an experiment on the parser making the use of
>> commas optional, interpreting simple juxtaposition as indicating an
>> implicit intervening comma.  We've used this change to successfully
>> compile some test programs (including non-trivial programs such as
>> samples/calculator.m) written without commas.

Adjust your parser, I've decided to replace the word space by a space
character :-) 

IMHO this change is not desirable since it is going to make the
programs harder to read. The fact that this is optional is not
sufficient since, I can only force myself or a reasonable set of
people around to keep the commas as visible clues. For other Mercury
programs, say code of the compiler or libraries coming from the net,
I will have no choice. 

What if one sometimes uses the commas and then does not in the same
file?  Where will I find a hint that I should or not check for a   with
the meaning of comma? The chosen syntax should at least be consistent
across a file and declared to be used (so many things need
declarations in Mercury, syntax should too, for the same reason of
improving communication between team members).

The time saved off typing commas is peanuts compared to the total
time of any application (how many man years for the Mercury system?)
so this argument does not count.

Maybe the  addition of an extra tool 'mercury-add-commas' which puts the
commas back into the source, not touching anything else, would help
but at some cost in source management.

Of course, there is also the issue of tools which support Mercury
editing and for which an approximation of the important syntax
separators is normally sufficient. Replacing comma with   will imply
extending support tools to include full parsers of the language when
really it's not completely needed.

When's release 1 with full unique mode support coming?

D.




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