[racket] How to create 'Internal Definitions' in a schemeinterpreter.

From: Jos Koot (jos.koot at telefonica.net)
Date: Sat Jul 24 13:26:02 EDT 2010

Yes, I did not think of that (rather new) feature.
Thanks for reminding me.

> -----Original Message-----
> From: carl.eastlund at gmail.com 
> [mailto:carl.eastlund at gmail.com] On Behalf Of Carl Eastlund
> Sent: 24 July 2010 19:20
> To: Jos Koot
> Cc: Pedro Del Gallego; users at racket-lang.org
> Subject: Re: [racket] How to create 'Internal Definitions' in 
> a schemeinterpreter.
> On Sat, Jul 24, 2010 at 1:11 PM, Jos Koot 
> <jos.koot at telefonica.net> wrote:
> > I did not study your interpreter thoroughly, but I see you 
> use a hash 
> > for an environment. This is bound to go wrong, for the same 
> variable 
> > may have different bindings in nested scopes. You'll need a 
> stack, or 
> > an association-list or something like that, in which 
> variables may be 
> > shaddowed.
> Or replace the mutable hash table with an immutable hash 
> table.  They support functional update, so you can extend 
> them and pass them around, but you get efficient hash table 
> lookup for free.
> --Carl

Posted on the users mailing list.