[racket-dev] syntax-property guards? (was: Re: The Stepper strikes again)

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Aug 16 17:26:24 EDT 2011

Four minutes ago, John Clements wrote:
> On Aug 16, 2011, at 5:10 PM, Eli Barzilay wrote:
> > A possible conclusion would be that it's useful to know these kind
> > of things about an expanded piece of syntax, and therefore more
> > macros should do that -- but that's unrelated from the stepper,
> > which is merely the motivation for requiring such functionality.
> > Just like continuation marks being useful for the stepper,
> > becoming part of the core language, and then getting used for much
> > more.
> I believe I disagree, but we're still being way too vague.
> For instance, consider the "stepper-skipto" annotations, that
> specify where in an expanded expression the user's original code
> wound up.  On the one hand, you could argue that "finding the
> original expression" is a general concept, and could be useful
> independent of the stepper, but in the absence of other tools that
> need to know this, the extra work of developing and documenting this
> general mechanism would seem to constitute a dramatic example of
> premature abstraction.

What I'd argue is:

1. There might be a way to get the same without those annotations.
   There's the `syntax-original?' thing, source locations etc.
   Perhaps it is not possible only because some of these need to
   change in minor ways.

2. I'm not sure about the exact details, but there are other uses for
   such functionality (or at least something very similar to it).  For
   example, there's code that I wrote a while ago to find parts of an
   expression that come from the original code for making TR errors
   readable.  (Something that I completely forgot that I did, until we
   talked about it in rcon.)

3. Combining #2 with the fact that the stepper has been around for
   ever (racketly speaking), I don't think that it's premature to talk
   about a general abstaction.

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

Posted on the dev mailing list.