[squeak-dev] References to a removed and reloaded class
colin at wiresong.com
Sat Sep 22 00:01:14 UTC 2012
>> Some code uses #at:put: only, others try #includesKey: and #at:ifAbsent:
>> which might not work as expected (see above).
> OK, then fix the code. at:put: seems right. at:ifAbsentPut: will create
> the wring kinds of bindings right?
I ran into this too. I'd like to fix the code by creating a new
protocol for dealing with bindings explicitly. Environment would
implement this protocol, and client code will use the new protocol
rather than manipulating dictionaries directly. So #at:put: would
become #bind:to: and so forth, with only a limited subset of the
functionality that dictionaries provide. Then we can add messages for
higher-level operations like removing or renaming classes.
More information about the Squeak-dev