Hi Noah, On Wed 07 Mar 2012 07:05, Noah Lavine <noah.b.lav...@gmail.com> writes:
>>> The “dynwind stack” actually (I misread it the first time.) >> >> Yes, it did have this name before. (More often, "the wind list".) But >> since "dynwind" is overloaded so much (dynamic-wind operator, <dynwind>, >> scm_dynwind_*), and the dynamic stack can have other things on it like >> prompts, I thought it best to give it a new name. > > I see your point about the old name, but I find the new name > confusing. What about the stack that holds regular program variables > and temporaries? That is also dynamic, so at first I thought you were > referring to that. I didn't know what was going on until this email. It's a good question! The essential difference is that lookup on the VM stack is static -- things are always at known locations. That's what lexical scoping gives us. Lookup on the dynamic stack is dynamic: e.g. "what's the nearest prompt with tag FOO", "what are the dynamic-wind expressions within that extent", etc. In an ideal world, we'd probably use the same stack for both purposes, as C++ does (AFAIU). The reason that we don't is that the scm_dynwind_* API manipulates the dynwind stack from outside of the VM. Cheers, Andy -- http://wingolog.org/