Thanks Hendrik for both responses - please see inline. <br><br><div class="gmail_quote">On Wed, Dec 1, 2010 at 7:23 PM, Hendrik Boom <span dir="ltr"><<a href="mailto:hendrik@topoi.pooq.com">hendrik@topoi.pooq.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br></div>The immutable hash table doesn't work well for lexically scoped<br>
variables.<br>
<div class="im"><br>
</div>You can end up with multiple simultaneous bindings of the same<br>
variable in different contexts. Look up the Knuth Man-or-boy problem,<br>
for example, in <a href="http://en.wikipedia.org/wiki/Man_or_boy_test" target="_blank">http://en.wikipedia.org/wiki/Man_or_boy_test</a></blockquote><div><br></div><div>But isn't that what's called for in a chained environment? The inner can see the outer bindings if not shadowed, but not vice versa. </div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Subsituting them away is a correct, but slow way of implementing lexical</div>
scoping. It was invented in the days when mathematicians were inventing<br>
formal logic, and computers weren't around yet -- more as a way of<br>
preciely defining concepts tha a way of being practical. It had a clear<br>
meaning before side-effects became commonplace.</blockquote><div><br></div><div>So what would be a fast way? </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">But the activation frame doesn't have to be on the stack. It could,</div>
say, be om the heap.</blockquote><div><br></div><div>Yes agreed - I don't mean the frames need to be held on "the stack" - I don't even know if racket's frames are on "the stack". I just mean that I need to maintain my own stack of frames instead of relying on racket to do so. </div>
<div><br></div><div>Thanks, </div><div>yc</div><div> </div></div>