[mercury-users] lisp macros

Ralph Becket rafe at cs.mu.OZ.AU
Thu May 23 21:05:25 AEST 2002


Michael Day, Thursday, 23 May 2002:
> 
> When lisp evangelists try to convert people they usually mention a number
> of things that are not particularly exciting to Mercury or Haskell
> programmers, such as garbage collection and higher order code. The one
> unique lisp feature seems to be macros; does anyone have much experience
> with lisp macros and what they add compared to programming in a language
> like Mercury?

I used to hack a lot of Lisp; I don't miss the macro facility.

The Lisp macro facility was generally used for two purposes:
(1) as a kind of programmer-driven inlining tool; and
(2) to extend the "syntax" of the language to support things like Lisp's
loop syntax.

(1) is something you can take or leave - I'm personally quite happy with
just writing ordinary funtions etc. and adding pragmas if I feel the
compiler isn't quite up to the task (Haskell, in the GHC flavour, now
has programmable rewrite-rules as an experimental feature - it's not at
all clear yet whether this is a good idea or not).

(2) is a problem, because you can no longer look at code and assume you
know what is function application and what isn't - I found myself
constantly referring to the CLtL bible...  This sort of thing put me
right off the whole macro idea.

- Ralph

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