This page is part of the web mail archives of SRFI 72 from before July 7th, 2015. The new archives for SRFI 72 contain all messages, not just those from before July 7th, 2015.
> From: Andre van Tonder <andre@xxxxxxxxxxxxxxxxx> > > An update has been posted to the SRFI-72 draft. > > * Added section on reflective tower: > > "The proposed macro system has an infinite reflective tower. In > contrast with comparable macro systems, the hygiene algorithm > implements a refinement of lexical scoping that takes into > account the level of use of an identifier in determining its > meaning." Although the above quotation occurs three times almost verbatim, in the abstract, the introduction, and the specification, it does not get any clearer with repetition. As Brian Smith used the term "reflective tower" it referred to an interpreter for a language that could express modifications to its own interpreter. I don't think that's what you are after, is it? The second mention of the "infinite reflective tower" is followed by a reference [11] to Richard Kelsey and Jonathan Rees - The Scheme 48 implementation http://s48.org/ but a couple hours searching the Scheme 48 manual at that web site turned up no mention of reflective towers, and not much about macro expansion. Perhaps a better reference would be <a href="http://www2.parc.com/csl/groups/sda/projects/reflection96/abstracts/queinnec.html"> Queinnec - Macroexpansion Reflective Tower</a> but I don't know whether the reference would say "our proposed system is just like the one described by Queinecc, but with |syntax| instead of |quote|" or whether it would say "the work of Queinecc is totally obsolete, we have improved it in the following twelve ways...". A couple of examples of odd scope rules just isn't enough for me to figure out the plan. This seems to be a very big change from the previous proposal, and not like anything that I understand well. > * Added BEGIN-FOR-SYNTAX. I understood this when it was contrasted with |begin-for-import|, but now I am lost. What does it mean to evaluate "at one reflective level higher"? Do all macros that expand to macro definitions now have to appear inside two nested |begin-for-syntax|? > * Added SYNTACTIC-WIND. Oy. > * Removed EXPAND. Why? ...and if it is gone, why is this code in the section on the reflective tower? (for-each (lambda (form) (eval (expand form))) sequence) == (for-each eval (map-in-order expand sequence)) The phrase: > ... the hygiene algorithm of this SRFI implements a refinement of > lexical scoping that takes into account the level of use of an > identifier in determining its meaning. might be better worded as: the algorithm of this SRFI totally ignores lexical scoping by making the meaning of an identifier depend upon an invisible property called its "level" rather than its position in the source code. ...but I have already stated my objections when you first brought up this idea. I thought the contribution of srfi-72 would be to standardize some conventions for writing procedural macros while preserving hygiene. I am not sure whether this "infinite reflective tower" is a minor variation, an incompatible new plan, or perhaps a refinement that could be put into a different srfi leaving srfi-72 alone. In other words, would the old srfi be compatible with the reflective tower, except that it would give errors (identifer used outside its scope of definition) in some cases where the tower would find and use a binding occurrence that would appear to be shadowed? -- -- Keith Wright Programmer in Chief, Free Computer Shop --- Food, Shelter, Source code. ---