Dynamic scoping (was: Proposal: Squeak-E = Squeak x Kernel-E)
avi at beta4.com
Mon Jan 27 19:59:53 UTC 2003
On Mon, 27 Jan 2003, Stephen Pair wrote:
> Avi Bryant wrote:
> > On Mon, 27 Jan 2003, Stephen Pair wrote:
> > > Have you looked at RuntimeEnvironments (on SqueakMap)? They
> > > accomplish the same effect, but they are cleaner than using
> > > exceptions...
> > By whose definition of cleaner? ;)
> Well, I consider "Env at: #world" to be more clear about the intent than
> "MyWorldEnvironment signal" or similar...don't you? I think you are
> looking at the implementation.
Well, yeah. :) I thought that's what you meant. Obviously there's no
reason you can't have the same interface to both implementation
approaches. I currently use an exception based dynamic scope that looks
DynamicContext bind: #foo to: 42 during:
self assert: #foo dynamicValue = 42
self assert: #foo dynamicValue isNil.
But whatever, interface is easy to change.
> I agree that the runtime environment should be inter-woven in the
> context stack. I'm actually working on that change right now.
More information about the Squeak-dev