[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: macros, procedure->macro

From: Dirk Herrmann
Subject: Re: macros, procedure->macro
Date: Sat, 13 Jul 2002 08:53:40 +0200 (CEST)

On 13 Jul 2002, Neil Jerram wrote:

> Thanks, that's helpful.  So we won't support references to a macro
> that is defined in a following top-level form, as in:
> (define-macro (foo x) `(list ,(bar x) ,x))
> (define-macro (bar x) `(* ,x ,x))
> or is there a cunning plan that still allows us to support this?

I don't see why recursive macros shouldn't be possible.  This, however,
depends on the implementation of the macro system used.  Clinton has
demonstrated that it does work with r5rs macros.  This will continue to
work, since even today the r5rs macros in guile are expanded prior to

However, there are things that won't work any more:
  (define (foo) (bar))
  (define-macro (bar) #f)
With today's guile, the expansion of foo is done at the first evalution in
contrast to the definition of foo.

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]