[mercury-users] Re: lisp macros
Milan Zamazal
pdm at zamazal.org
Mon Jun 3 20:25:39 AEST 2002
>>>>> "RB" == Ralph Becket <rafe at cs.mu.OZ.AU> writes:
RB> I used to hack a lot of Lisp; I don't miss the macro facility.
RB> The Lisp macro facility was generally used for two purposes:
RB> (1) as a kind of programmer-driven inlining tool; and
RB> (2) to extend the "syntax" of the language to support things like
RB> Lisp's loop syntax.
One of the reasons why I moved from Prolog to Lisp instead of Mercury at
some time was Mercury's syntax. In my personal taste it's terrible,
making the language quite unreadable, mostly resembling Perl. Starting
from the real stupidities inherited from Prolog (e.g. `term(...' versus
`operator (...'), going through the annoyances implied by using an infix
syntax, and finishing with the impossibility to define readable loop
constructs.
I can see two reasons for using Mercury: Its clean declarative semantics
and an excellent static checking and analysis. Mercury fixes Prolog
very well in this area and really moves logic programming to a wider
application. However, these features don't require creating a new
programming language IMHO, I can't see anything preventing to provide
these features in a Common Lisp environment (not as obligatory features,
but as optional facilities). Instead of having Mercury as a programming
language, I'd be much more happy having Mercury in the form of a Common
Lisp library.
Still, even if it's a separate programming language, I'd be more
interested in it, if some (macro?) facility allowed me to fix the syntax
myself (I don't think it's likely the current overall Mercury syntax
will be ever changed). I thought once about defining my own Lisp-like
Mercury syntax and writing a preprocessor transforming it into the real
Mercury syntax, but I've found it quite impractical for more reasons.
Milan Zamazal
--
Free software is about freedom, not about free beer. If you care only about
the latter, you'll end up with no freedom and no free beer.
--------------------------------------------------------------------------
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