[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [plt-scheme] eval question



I have to say, I must agree with this use of eval/load. 
The problem exists whenever you dynamically link in a module or
unit, so what's the big deal with this trick? 

Sebastian, if you can afford it however, you may wish to turn
this into a unit, and dynamically link in the unit. You could,
for example, check its interface and make sure that you don't 
get strange things ... Unfortunately Matthew has eliminated 
the closedness conditions on units now because of modules. 
To get more specs out of this, you could also wrap it as a module

-- Matthias


> -----Original Message-----
> From: owner-plt-scheme@fast.cs.utah.edu
> [mailto:owner-plt-scheme@fast.cs.utah.edu]On Behalf Of Sebastian H
> Seidel
> Sent: Wednesday, June 05, 2002 7:01 PM
> To: plt-scheme@fast.cs.utah.edu
> Subject: Re: [plt-scheme] eval question
> 
> 
> > >(with-input-from-file path
> > >   (lambda ()
> > >     (eval (read))))
> 
> Of course, I'll do this with load as was promised and is much simpler,
> but:
> 
> > Not only does this strike me as a bad idea from a 
> > thinking-about-your-program-and-documenting-it-clearly standpoint,
> 
> what, exactly, should be documented? What this little bit of code does
> is perfectly clear from an R5RS point of view.
> 
> > it's also a staggering security problem.
> 
> Yeah, if someone is in a real evil mood and alters the saved file.
> Then again, it's not much different from the way a .emacs works, for
> example.
> 
> > john "but I'm the only one who will ever run this code!" clements
> 
> again: what should be documented or what else are you getting at?
> 
> Sebastian
>