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

From: John Clements (clements at brinckerhoff.org)
Date: Sat Aug 13 10:47:43 EDT 2011

On Aug 13, 2011, at 10:44 AM, John Clements wrote:

> Adding dev to followups, hope that's okay with all three of you.
> On Aug 12, 2011, at 7:15 PM, Eli Barzilay wrote:
>> A few seconds ago, Matthias Felleisen wrote:
>>> This sounds wrong. The only way there can be a dependency is via
>>> require.  So how can it not be checkable, never mind copy or
>>> hand-coding.
>> The stepper has some function that annotates syntaxes with a stepper
>> specific value.  Stephen wanted to use this function but couldn't
>> because there was a dependency cycle.  So to "resolve" it, he copied
>> the function into `racket/private/promise' -- so now there's a bit of
>> stepper code that is duplicated in the core.  The duplication is
>> obvious problem #1.  The more subtle problem is the existence of code
>> in the core that has no meaning without the stepper.
> I'm coming a bit late to this party, but I disagree with at least some of this.
> Actually, I want to disagree mostly with the "more subtle problem."
> To start with, here's the basic motivating change to the code (lots like this):
> -  (defsubst (~and x ...) (~ (and (! x) ...)) ~and *and)
> +  (defsubst (~and x ...) (hidden-~ (and (hidden-! x) ...)) ~and *and)

One more minor aside I should have mentioned: Stephen's use of a macro here reads *much more nicely* than the way the rest of the stepper annotations explicitly inject the annotations using with-syntax; when I get time, I want to adopt this approach elsewhere.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4624 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20110813/b4b8632b/attachment.p7s>

Posted on the dev mailing list.