This is the mail archive of the guile@cygnus.com mailing list for the guile project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Russ McManus <mcmanr@eq.gs.com> writes:
> > Binding temp-var with `let' might be cleaner here.
>
> Since I was using 'set!' willy-nilly, I just kept going. See below
> for version with 'let'.
Yeah, no big deal. The point was not to get rid of one `set!' because
it isn't functional or something, but to avoid putting so much code
between the declaration and use of temp-var.
> > And after that you might want to try to express fluid-let with
> > defmacro but *without* gensym, while still being referential
> > transparent.
>
> Why is it important to get rid of gensym?
It is not important. I just think it's a nice puzzle to write macros
that don't use gensym. Compared to the rest of Scheme, gensym is a
ugly hack and consequently, people have invented much more
theoretically satisfying macro mechanism that are referentially
transparent without explicitely using gensym.
> Where can I find an understandable definition of 'referential
> transparency'?
There are several papers about the hygienic macro systems for Scheme.
They should contain some introduction to referential transparency.
It's not a difficult concept. Basically, it just means that the
identifiers you use in your macro definition can not conflict with
those used by the code that uses your macro, regardless how they are
named. And vice versa. I think "Macros that work" by Clinger and
Rees has a nice introduction but I was only able to find the .tex
source, which requires acmconf.cls. It's here
http://www.ccs.neu.edu/home/will/papers.html
Anyone has more pointers? I remember that I once read a very nice
introduction to these issues but I can't find the paper right now.