On May 27, 2009, at 8:50 AM, Michele Simionato wrote:

[19] C. Queinnec. Macroexpansion reflective tower. In Proc. Re-
flections Conference, pages 93–194, Apr. 1996.


I don't know who introduced the concept of the tower for the first time,
but implicitly the tower is there from the beginning, at least from
the time when Lisp was compiled for the first time. Once you have
the ability to nest macros, you have a non-trivial tower of meta- levels,
with positive and negative levels.

"The reflective tower" is not specific to macros: there are other
"meta" things to reflect upon, like accessing and extending the
evaluator of the base (meta n-1) language from the meta language.

Scheme macros is a very restricted form of the full tower, since
you can extend only the syntax and nothing else.

Anyways, there is a must-read paper which I'm glad finally made
it to web:

``The Mystery of the Tower Revealed: A Nonreflective Description
of the Reflective Tower'' by Mitch Wand and Dan Friedman (1988).

The new thing in the R6RS report is that now the tower is made
very explicit to the programmer whereas before it was somewhat
of a secret.

You're making it sound more mystical than it really is. :-)

Implementations with implicit phasing make a good
job of hiding it again  (the levels are still there conceptually,
but once an identifier is imported at all levels with the same binding,
the programmer is not forced to distinguish them explicitly).

I don't know what the fuss is all about.  I really only see Scheme
macros (say with syntax-case) as term-rewriting on steroids.  All
it does is "replace this junk with that, and please stay clean".
To support different meta languages (with different semantics) at
different levels requires more (and is much harder) than what's in
Queinnec's or Flatt's paper.

Aziz,,,

Reply via email to