From: Allison Randal <[EMAIL PROTECTED]>
   Date: Fri, 02 Nov 2007 15:24:40 -0400

   Bob Rogers wrote:

   >    From re-reviewing our earlier correspondence, I get the impression
   > that you have a particular implementation in mind, one which doesn't
   > seem to work for my use case.  Perhaps you should describe the use case
   > for your implementation, and then we can decide whether to combine them.

   I have an implementation in mind for dynamically scoped variables in 
   general. It's similar to the implementation of lexicals (may even use 
   the same LexPad structures), but instead of linking along the chain of 
   lexical scopes outward, it links along the chain of return continuations 
   backward. This would allow for capture by return continuations, and so 
   restoration on return invocation. It would also allow for declaring a 
   dynamic variable in one scope that masks-without-modifying a variable in 
   a previous dynamic scope (much like inner lexicals).

At this level of description, and except for the mention of LexPad
structures, that sounds like the basic mechanism I had in mind.

   At the time you implied that you would rather see "one data structure
per scope" instead of one per binding; I imagine this was an allusion to
something LexPad-like.  But I have trouble visualizing how one of these
per scope can achieve the necessary granularity, given that contexts
won't bind all of their dynamic variables at once.  How would
continuations and called contexts figure out which subset of bindings
are in scope?

   I'm just trying to get a clear definition of the problem you're solving, 
   so I can lay solution and problem side-by-side and see if they match. It 
   may be that I need to just spec and implement dynamically scoped 
   variables, then let you try using it and see if you need anything more.

   Allison

I should be able to tell you that after reading the spec, shouldn't I?
(And if not, why not?  ;-)

                                        -- Bob

Reply via email to