[squeak-dev] [Patch] Class>>#bindingOf: with inheritance priority
over Smalltalk global variables
Klaus D. Witzel
klaus.witzel at cobss.com
Tue Feb 26 19:27:41 UTC 2008
I want to give priority of a class' hierarchy's bindings over that of
(self environment) when the latter defaults to the Smalltalk global
dictionary (as is the case today in most images).
Attached is a patch which supports SharedPool as it was introduced in
-
http://lists.squeakfoundation.org/pipermail/squeak-dev/2003-May/058391.html
But with the patch the scope of global variables is now as follows:
1] classPool
2] sharedPools
3] environment if ~~ Smalltalk
4] superclass
5] Smalltalk (or equivalently, nil environment)
Without the patch and as is today, item 5] takes precedence over the
superclass hierarchy item 4] whenever (aClass environment == Smalltalk) is
the default. With the patch inheritance has priority. It can for example
be made possible to "shadow" any global variable by using a SharedPool and
class initialization code, and that is now inherited.
Feedback is appreciated; also if you want see the patch in the next
release.
/Klaus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Class-bindingOf-kwl.st
Type: application/octet-stream
Size: 1029 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080226/cf6a5bae/Class-bindingOf-kwl.obj
More information about the Squeak-dev
mailing list
|