Hello, I've been looking at implementation of Associtation and LookupKey (its
superclass). 
In LookupKey, there is LookupKey>>#= and LookupKey>>#hash both implemented
to use key (compare keys and use hash of key), but in Association,
Association>>#= compares both key and value, but hash is not changed there,
so only hash of key is used, therefore it does not correspond to
implementation of method = ... shouldn't it?

To demonstrate:
(1 -> #a) = (1 -> #b).
  is false but
(1 -> #a) hash = (1 -> #b) hash.
  is true

I also noticed similar discussion for Doplhin smalltalk
http://forum.world.st/Association-gt-gt-hash-td3368868.html where guys state
it is all right, but I still do not see why.

Jan



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html

Reply via email to