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

Re: [Scheme-reports] Toplevel import scoping



On Sat, 23 Apr 2011 22:02:26 -0400, Andre van Tonder <andre@x>  
wrote:

> (define x 0)
> (define (get-x) x)
> (import (foo))
> (display x)              ==> 1
> (display (get-x))        ==> WHICH WILL IT BE?

IMO, an import into the top-level of the REPL should redefine any bindings  
exported of the same name as they were defined otherwise.

In other words, the above definition of GET-X contains a free reference to  
X. That X should not be "dereferenced" until GET-X is applied, at which  
point, the binding for X is that exported by (foo).

	Aaron W. Hsu

-- 
Programming is just another word for the lost art of thinking.

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports