[BUG] [FIX] Semaphore hash

Tim Rowledge tim at sumeru.stanford.edu
Mon Apr 3 16:26:17 UTC 2000



Wim Boot wrote:
>
> I think Semaphore comparison (including #hash) should be identity
> based, not content based.

I agree with Wim; I hit this problem when cloning the image a while ago.

There seems to me to be a problem with making a hash values depend on
content of a mutable object - change the content and any collection
holding the object is now messed up (from the point of view of using the
hash to access it). Semaphores are pretty dynamic and so the first and
last (or any other) element will likely not stay the same for long, and
the hash would not match for long.

We did have a short thread on this subject when I hit the problem last
year, but no real resolution.

tim






More information about the Squeak-dev mailing list