[racket-dev] [plt-scheme] Bug or misuse? match-expander ids not properly working (patch)

From: Eli Barzilay (eli at barzilay.org)
Date: Fri May 4 14:52:39 EDT 2012

20 minutes ago, J. Ian Johnson wrote:
> That behavior would be really spooky to me. I would expect binding
> positions to not depend on any environmental information.

(It's still the same, only the definition of what is a binding
position is a bit different.)

> Perhaps have an (id _) form that would allow putting your special
> identifiers there.

And, Carl Eastlund wrote:
> If we add some kind of id expanders for match patterns, we need to
> add a way for pattern variables to shadow these names if the author
> really wants to.   Otherwise, every id expander defined eats up more
> namespace that match variables cannot bind.
> We already have this issue with _ and ..., but at least that's a
> known set of constant size.

Some (id <name>) be possible, but definitely an overkill for the
purpose of `null' etc.  Like I said, there should be *very* few of
them in `#lang racket'.  The rest are for your own convenience, as in
Madoka's case (and in a few cases I ran into).  I could obviously
define and provide a match expander for `x' in my library that you'll
want to use -- but that's the same as providing you with my own `if'.

The bottom line is that if this change is done, then such an `id' form
would not be necessary -- either it's for obvious names (the few that
are done in the library), or for names that you defined which you're
supposed to know about.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.