This is the mail archive of the guile@sourceware.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]

Re: Strange behavior in a catch with (and) and (or)


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]