[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macros, procedure->macro
From: |
Marius Vollmer |
Subject: |
Re: macros, procedure->macro |
Date: |
14 Jul 2002 18:26:12 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Neil Jerram <address@hidden> writes:
> Thanks for pointing this out. However, r5rs are by definition
> hygienic, one of the corollaries of which (if I understand correctly)
> is that it makes no difference when or how many times macros are
> expanded.
It does make a difference when we also consider redefinitions, and
definitions textually after the first use. I.e., which definition of
bar is used in the following example?
(define-syntax bar ...)
(define (foo) (bar))
(define-syntax bar ...)
> With r5rs macros, therefore, we can easily delay expansion as late as
> possible (e.g. immediately before evaluation) so as to support all
> kinds of recursive references.
I think it is more important to give us leeway to perform macro
expansion as early as possible, to make life easy for compilers.
> With non-hygienic macros, timing matters. So, if Guile wants to
> support non-hygienic macros at all (in addition to r5rs), it's
> important to be precise about when they are expanded.
Another option would be to not be precise and just expect macro
writers to code their macros in such a way that they don't depend on a
the exact behavior of the implementation. This might even be
desirable, to encourage people to write portable code.
The conservative assumption is that macros are expanded once, in a
environment that is totally different from the run-time environment.
But, of course, precisely specifying our implementation works is also
a good thing.
- Re: macros, procedure->macro, (continued)
Re: macros, procedure->macro, Gary Houston, 2002/07/01
Re: macros, procedure->macro, Neil Jerram, 2002/07/09
- Re: macros, procedure->macro, Dirk Herrmann, 2002/07/10
- Re: macros, procedure->macro, Neil Jerram, 2002/07/10
- Re: macros, procedure->macro, Dirk Herrmann, 2002/07/10
- Re: macros, procedure->macro, Neil Jerram, 2002/07/12
- Re: macros, procedure->macro, Clinton Ebadi, 2002/07/12
- Re: macros, procedure->macro, Neil Jerram, 2002/07/14
- Re: macros, procedure->macro,
Marius Vollmer <=
- Re: macros, procedure->macro, Rob Browning, 2002/07/15
Re: macros, procedure->macro, Dirk Herrmann, 2002/07/13
Re: macros, procedure->macro, Neil Jerram, 2002/07/14
Re: macros, procedure->macro, Dirk Herrmann, 2002/07/14
Re: macros, procedure->macro, Marius Vollmer, 2002/07/15
Re: macros, procedure->macro, Neil Jerram, 2002/07/15
Re: macros, procedure->macro, Dirk Herrmann, 2002/07/16
Re: macros, procedure->macro, Dirk Herrmann, 2002/07/03