[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Looping local binding
Re: Looping local binding
Sat, 3 Nov 2007 13:33:40 -0500
> From: Dmitry Dzhus <address@hidden>
> That's terrific, Marco, and that code is almost clear to me.
> I'm now strongly convinced that I should introduce myself to Scheme
> macro forms closer. What may a recommended definite guide to it? (I
> read SICP, but that book concentrates on other kind of things).
There is no definitive guide. Macros in Scheme are
one of the more interesting areas of active research.
I do not think there are two implementations that
do it exactly the same way. The sixth revised report,
which was ratified just weeks ago, has a macro system
that is nothing like that in Guile.
I learned a lot about it by reading the reference
implementation by Andre van Tonder, Here is a
chunk from my email file.
Good Luck in your search!
If you only want to know about Guile macros, I'm
afraid you have no choice but to read Guile documentation.
> From: AndrevanTonder <address@hidden>
> Cc: address@hidden
> > AndrevanTonder wrote:
> >> R6RS Libraries and Syntax-case
> >> implementation is available at:
> >> http://www.het.brown.edu/people/andre/macros
> > This is a different library than what Abdulaziz Ghuloum announced recently,
> > <http://www.cs.indiana.edu/~aghuloum/r6rs-libraries/>?
> > What are the differences?
> As you noticed, there are currently two portable reference implementations
> of R6RS libraries and syntax-case. Even though they are both R6RS compliant,
> there are indeed differences between them. Aziz may have further comments,
> but the differences that are known to me are the following:
> * The largest difference is in how identifier import levels are treated.
> The Van-Tonder implementation enforces declared import levels while the
> Ghuloum-Dybvig implementation does not. In other words, the Van-Tonder
> implementation treats a reference to an identifier outside its declared
> import levels as a syntax violation, while the Ghuloum-Dybvig
> implementation ignores import level declarations, allowing references to
> identifiers outside their declared import levels. Both models are allowed
> by R6RS.
> As a result, a working Van-Tonder library will be portable to the
> Ghuloum-Dybvig system, but a working Ghuloum-Dybvig library will
> not necessarily be portable to the Van-Tonder system.
> The Van-Tonder implementation is in fact very close to the model
> developed long ago by Matthew Flatt of PLT, with which there
> is a large amount of historical experience among the PLT
> user base. For more details on the model and the design reasons
> behind it, see for example the article:
> Further http://citeseer.ist.psu.edu/flatt02composable.html