> You need to shadow the cl:if symbol, and then you can redefine it with
> defmacro.

Can you explain further, perhaps give code that works?  I've used let,
flet, and macrolet to rebind cl:if, and tried to run defmacro under that
binding, and none of them worked (in CLisp or SBCL).

> Chicken and scsh/scheme48 support explicit-renaming macros, which subsume
> defmacro macros; Chibi supports syntactic-closure macros, which subsume
> both of the other two.  In Gambit, the option "-:s" provides syntax-case
> support.

and

> Standards >= R5RS do guarantee it.

Interesting, thanks.  Scheme and Schemes are better than I realized... I
now feel like I could change most of everything to my liking if necessary,
and rely on that as a viable long-term approach.  I might do that.

--John Boyle
*Science is what we understand well enough to explain to a computer. Art is
everything else we do.* --Knuth



On Thu, Oct 11, 2012 at 7:19 PM, John Cowan <[email protected]> wrote:

> John Boyle scripsit:
>
> > I hope so.  All Common Lisp implementations I've tested flat-out disallow
> > "redefinition of the special form "if"".
>
> You need to shadow the cl:if symbol, and then you can redefine it with
> defmacro.
>
> > Chicken... does provide defmacro, in a separately downloadable library
> > I found just now, which does work the way I want; Chibi and scsh/scheme48
> > don't seem to have low-level macros, while Gambit doesn't even have
> > define-syntax.
>
> Chicken and scsh/scheme48 support explicit-renaming macros, which subsume
> defmacro macros; Chibi supports syntactic-closure macros, which subsume
> both of the other two.  In Gambit, the option "-:s" provides syntax-case
> support.
>
> > I suppose this committee qua Scheme committee isn't responsible for
> Common
> > Lisps, or technically even Racket.  Restricting my view to the other
> > Schemes, they do seem to universally allow redefinition of built-in
> > operators without breaking everything, unlike the Common Lisps (and emacs
> > lisp).  Clearly this is a good feature in this case, though I don't
> believe
> > the standard guarantees it, and I wonder whether it'll be different for
> new
> > Schemes or whether existing Schemes will change.  Meanwhile, I'll
> continue
> > using Racket as a compilation target and runtime.
>
> Standards >= R5RS do guarantee it.
>
> --
> Go, and never darken my towels again!           John Cowan
>         --Rufus T. Firefly                      http://ccil.org/~cowan
>
_______________________________________________
Scheme-reports mailing list
[email protected]
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports

Reply via email to