[mercury-users] lisp macros

Richard A. O'Keefe ok at cs.otago.ac.nz
Fri May 24 11:05:39 AEST 2002


Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
	Yes, but we don't want the hoi polloi being able to do that!  If you
	make it part of the language then you don't force developers to go
	through the traditional syntax war process (my tongue is only half in
	cheek on this one.)
	
The whole point of macros, as I see them, is information hiding.
A good macro is one that reduces the visible complexity of the program
and the difficulty of development for its users.  I've _never_ particularly
cared which things in Lisp are macros and which aren't.  Basically, it's
obvious:  if the construct takes any "arguments" which are not just
evaluated, it's a macro (or a special form, which is just a built in macro).
Otherwise it's a function.

A good macro hides something.

As for hoi (the) polloi (many), they aren't using Lisp or Mercury anyway.
Any argument that says "we'll trust <x, y, and z> to make language
extensions, but not customers, because they're dumb and don't agree with
each other" is suspect; it is perfectly possible to have language wars
concerning the order of arguments to a procedure.

Basically, if there is some kind of language extension which would make
developers' lives easier, here are their alternatives:
 - use language extension features provided in the system
 - write their own preprocessor
 - use a macro processor like M4
 - give up and write bulky error-prone code
 - give up completely

I note that O'CAML lets you plug in a preprocessor.
--------------------------------------------------------------------------
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