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

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Sat Jul 24 13:20:11 EDT 2010

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.


Posted on the users mailing list.