[plt-scheme] to define, or to let

From: Felix Klock's PLT scheme proxy (pltscheme at pnkfx.org)
Date: Sun Mar 21 12:49:39 EST 2004

On Mar 21, 2004, at 12:20 PM, Felix Klock's PLT scheme proxy wrote:

>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>
> On Mar 21, 2004, at 3:08 AM, Anton van Straaten wrote:
>
>>   For list-related administrative tasks:
>>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>
>> Felix Klock wrote:
>>> However, for the Standard (R5RS) language, DrScheme should (at least)
>>> print a warning for such uses of LETREC.
>>
>> I'm not sure how easy violations are to detect.  It would be easier, 
>> and
>> make more sense IMO, to implement the standard letrec for the PLT R5RS
>> language.  I suspect that might not be popular, though.
>
> I feel like I'm missing something here.
>
> Isn't violation-detection just a small modification of standard 
> free-variable analysis, where in this modification you do not descend 
> into the bodies of LAMBDA expressions (and instead, the free-vars of a 
> lambda is always the empty list)?
>
> This sounds *cheaper* than free-variable analysis to me.
>
> What is the difficulty here?  The need to macro-expand prior to doing 
> the analysis?  Or...?

Or did I once again backtrack in understanding of the problems here?

Is the real problem this business of capturing (and re-entering) 
continuations within the expression-to-be-bound?

I agree that seems hard to detect.

But I wasn't trying to address detection of that violation.  I was 
instead trying to suggest that the R5RS language in DrScheme detect the 
access of previously-bound variables in the right-hand side of `letrec' 
binding.  That, to me, seems like the piece of the extension that is 
most likely to be mistakenly used by a developer when they attempt to 
write portable code that conforms to R5RS (as Anton stated in his 
response to Matthew).

So my email really was a feature request, not a bug report.

-Felix

----
"It's a nice fantasy, isn't it?"  -G.C. Rota (10/24/97)



Posted on the users mailing list.