[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Redefining macros and special forms
From: |
John Cowan |
Subject: |
Re: [Chicken-users] Redefining macros and special forms |
Date: |
Wed, 29 Oct 2014 20:59:20 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Peter Bex scripsit:
> This inconsistency could be considered a bug: if a new identifier is
> introduced at the toplevel which "shadows" a macro, it could erase the
> macro. It's not a priority because the spec doesn't really say what to
> do, and the responses of various Schemes differ in this. Gambit for
> example even disallows redefining macro definitions:
>
> > (define begin -)
> *** ERROR IN (console)@1.9 -- Macro name can't be used as a variable: begin
Gambit is inconsistent in its inconsistency. It will allow you to fully
override a macro name, but not a built-in syntax keyword such as begin
or cond.
> But yeah, many other Schemes simply replace the macro definition by the
> procedure.
The only ones that don't (from my test suite) are Chicken, Bigloo,
STklos, and Picrin. I have filed a bug against Picrin, since it is an
R7RS Scheme and R7RS doesn't permit this behavior.
--
John Cowan http://www.ccil.org/~cowan address@hidden
Time alone is real
the rest imaginary
like a quaternion --phma