Re: syntax-rules problem
Helmut Eller <[email protected]>
| Newsgroups | gmane.lisp.scheme.scheme48 |
|---|---|
| Message-ID | <[email protected]> |
* Taylor R Campbell [2008-11-19 14:48+0100] writes: > This is the intent of hygiene. The macro DEFINE-A cannot refer to > names in the user's environment, and the user cannot refer to names in > DEFINE-A's environment. If you want your macro to define a binding of > a name in the user's environment, the user must supply that name. > SYNTAX-RULES can express only hygienic macros; you will need to use > explicit renaming macros if you want to break hygiene (or concatenate > names, &c.). Thanks. I think I understand now better how that is supposed to work. My private rule is now: the "symbols" in the template are always renamed during expansion. Those renamed symbols can be used to lookup bindings in the environment of the template, but it's impossible to create an identical symbol outside the template. BTW, the same code example, when evaluated in Ikarus or Larceny, returns 0 without complaining. Sorry, for asking newbie questions. Helmut.