On Jun 27, 2011, at 5:10 PM, Robby Findler wrote:

> On Tue, Jun 28, 2011 at 7:52 AM, John Clements
> <cleme...@brinckerhoff.org> wrote:
>> 
>> On Jun 27, 2011, at 4:45 PM, Robby Findler wrote:
>> 
>>> We're talking about relative requires only, right?
>>> 
>>> How are you proposing to signal the error?
>> 
>> My guess about how this works--correct me if I'm wrong--is that for unsaved 
>> buffers, DrR sets a parameter such that the expanded code has the current 
>> directory as (uh, part of?) the syntax-source of the expanded source.  I'm 
>> guessing that I'm not right, or it would be as simple as disabling this for 
>> programs written in BSL et al.
> 
> DrRacket does indeed set current-directory and could instead signal an
> error instead of setting it. That would mean no unsaved file would
> run, however. Is that really desired?

Would it not be possible to set the syntax-source in such a way that relative 
requires would fail? We may be out of DrR and into just plain R here.  

Indeed, I would be happy if buffers without a recorded save location couldn't 
make relative requires in *any* language level, though I realize that such a 
change would be more likely to have repercussions elsewhere.

I suppose there could be situations where users dynamically create syntax 
objects and set the current directory rather than setting the syntax-source of 
the objects, though that doesn't sound like the most robust way to write the 
code.

> 
> Also, this would not work for the #lang htdp/bsl versions of the
> teaching languages.

Because the choice of language level isn't apparent at DrR expansion-time, I'm 
guessing. If so, then I agree, though (if I'm correct) my more drastic solution 
would address this as well.

John

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Reply via email to