[plt-scheme] eval-string namespace

From: Paulo Jorge de Oliveira Cantante de Matos (pocm at mega.ist.utl.pt)
Date: Wed Jul 30 07:39:26 EDT 2003

Hi,

> 
> The point here is that `eval-string' is not lexically sensitive in any
> way. It always compiles free identifiers in the input expression to
> refer to the toplevel -- not the place where the eval-string was
> called.
> 

That seems unfortunate from my point of view. That might be a good
(maybe simple) solution for most cases but what is I don't want other
who require test to have access to those functions? I want them to be
called only by eval-string? Then it seems I don't have any other choice,
do I? I need to provide them without questioning. That's what bothers
me.

Thanks,

Best regards,

Paulo J. Matos

> Robby
> 
> At 29 Jul 2003 22:15:29 +0000, Paulo Jorge de Oliveira Cantante de Matos wrote:
> >   For list-related administrative tasks:
> >   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> > 
> > Hi all,
> > 
> > Check the following:
> > (module test mzscheme
> >   
> >   (require (lib "string.ss"))
> >   
> >   (define (foo)
> >     (eval-string (read-line)))
> >   
> >   (define (bar)
> >     (display "Done"))
> >   
> >   (provide foo))
> > 
> > If I run this, require test.scm and enter bar for read-line I get that
> > bar is undefined. But it'll work alright if I provide bar. Why? 
> > I don't understand this behaviour, it's definitely not what I expected.
> > In the manual there is no mention to this situation, which is I might
> > say strange and boring since I have in the module 20 functions that can
> > be called through eval-string that I don't want to provide.
> > 
> > Any suggestions?
> > 
> > Best regards,
> > 
> > Paulo J. Matos
> > 
> > 
> 



Posted on the users mailing list.