On 29 May 2007, at 09:36, Abdulaziz Ghuloum wrote:
>
> On May 29, 2007, at 3:04 AM, John Cowan wrote:
>
>>> In fact, syntax-case is strictly more expressive than the old-
>>> style Lisp
>>> macros represented by defmacro. The lisp-transformer on page 54
>>> of the
>>> library document shows how syntax-case can be used (trivially) to
>>> write
>>> old-style Lisp macros. Defmacro itself is easily defined using
>>> lisp-transformer.
>>
>> It sounds like they are equivalent in power, then.
>
> Give a trivial definition of syntax-case using defmacro and I would
> grant you that the two are equivalent in expressive power. So far,
> we know that (1) you can express defmacro using syntax-case and (2)
> you cannot do the converse. I don't see how that sounds like the
> two are equivalent in power.
(1) Expressing defmacro alone is not enough. You have to be able to
express at least macroexpand as well (and this has a number of
consequences which require you to do even more).
(2) You can do the converse. I have a relatively straightforward
implementation of hygienic macros in terms of defmacro. I hope to be
able to report on that soon.
Granted, (2) doesn't help much for the discussion for the time being.
However, a claim "you cannot do the converse" should at least be
replaced by "so far, the converse hasn't been shown yet." The
stronger claim would require an elaborate proof.
Pascal
--
Pascal Costanza, mailto:pc at p-cos.net, http://p-cos.net
Vrije Universiteit Brussel, Programming Technology Lab
Pleinlaan 2, B-1050 Brussel, Belgium
Received on Tue May 29 2007 - 05:00:24 UTC