[mercury-users] Re: Lisp-like syntax for Mercury (Mercury & macros)

Peter Schachte schachte at cs.mu.OZ.AU
Tue Jun 11 13:21:35 AEST 2002


On Mon, Jun 10, 2002 at 01:18:40PM +1200, Richard A. O'Keefe wrote:
> 	How about font-locking with things like heavy overloading of the quote
> 	character (0'a, 'term'(...), 'string')?
> 
> I don't want, don't use, and therefore in my editor, don't have
> font-lock.  So no problem.  However, term movement gets 0'a and 'xxx'
> perfectly correct, not hard at all.

I have to disagree here.  Travarsing terms *backwards* is difficult
due in part to single quotes.  For example, if you see on the last
line of a term:

	X = 0' .

You can't tell whether the previous line (or some line further back)
has an unbalanced single quote, maybe looking like:

	Y = ',

which binds Y to the atom ',\n\tX = 0'.  If instead the previous line
is

	Y = '',

then the last line does what it looks like:  it binds X to 32.

> I have never found an Emacs mode where automatic indentation was even
> tolerable.

I haven't found one I'm happy with, either, including the one I wrote.
But I still find them better than doing all the layout myself.  And I
look back on Xerox Lisp's SEdit structure editor with increasing
nostalgia and impatience for such a beast to appear again, but able to
handle languages with a more complex syntax than Lisp's.  To me,
laying out my source code is about as interesting as laying out
paragraphs like this one:  I just can't see why I should spend any
time, effort, or attention on it.

> However, '.' followed by white space is
> end of clause, '.' followed by anything else isn't.

Not true:

	  X =  0'.
	, Y = '0'.

is a single Prolog term, not two.

Of all the possible characters that could have been chosen as a radix
mark, using a single quote seems like one of the worst possibilities.

-- 
Peter Schachte              Not everything that counts can be counted.
schachte at cs.mu.OZ.AU            -- Denis Burkitt 
www.cs.mu.oz.au/~schachte/  
Phone: +61 3 8344 9166      
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list