[plt-scheme] track symbols and respecting the lexical environment

From: YC (yinso.chen at gmail.com)
Date: Wed Aug 15 16:01:50 EDT 2007

Hi Matthew - thanks for the tip and I will experiment with it.


On 8/15/07, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Wed, 15 Aug 2007 01:23:01 -0700, YC wrote:
> > Of course - any data stored in a hash table would live until the hash
> table
> > goes out of scope or until the data gets overwritten, and it doesn't
> obey
> > lexical rules.
> >
> > Are there ways to make it obey lexical rules so the register can behave
> more
> > like an actual symbol table?  i.e. if a type is declared within a
> lexical
> > scope as it goes out of scope the value is removed from the register.  I
> > assume that if this is possible there needs to be a way to know that I'm
> in
> > a different lexical scope then before.
> See `make-bound-identifier-mapping'.
> There's no way for bindings to get dropped from the table, but scope
> should work out right. Also, when compiling modules, a fresh module
> instantiation for each expand/compile will effectively clear the table
> each time you expand/compile a module.
> Matthew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070815/374bc3d5/attachment.html>

Posted on the users mailing list.