This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Strange behavior in a catch with (and) and (or)
- To: guile at sourceware dot cygnus dot com
- Subject: Re: Strange behavior in a catch with (and) and (or)
- From: Radey Shouman <Radey_Shouman at splashtech dot com>
- Date: 02 Mar 2000 12:48:31 -0500
Jim Blandy <jimb@red-bean.com> writes:
> In Guile, an identifier gets bound to syntax the same way it gets
> bound to any other value. Thus:
[...]
> guile> (let ((x quote)) (x (howdy there kids)))
> (howdy there kids)
>
> This kind of thing should be a syntax error --- uses of `quote' like
> the one above are not variable references, since quote is not a
> variable, according to R5RS 3.1:
This can, and should, be checked at memoization time. The first time
a symbol is looked up, it may be checked for macro-hood, and an error
about keyword abuse signalled if the symbol is not in the car of a
sexp. Since there are functions returning macros this cannot be made
watertight, but should catch most errors. SCM has done this for
quite some time.