note on using hash of an object's class....

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

note on using hash of an object's class....

Dale Henrichs
I've just noticed that in GRSmallDictionary>>hash, the hash of the class
is used for calculating the object's hash and I just wanted to point out
that that is not portable (at least relative to GemStone).

In GemStone there is the notion of class histories, which means that
there are multiple versions of a class which means that the hash of a
class cannot be counted on to be constant for a given class, which means
that it shouldn't be used in hashes...

Dale
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: note on using hash of an object's class....

Dale Henrichs
On 10/11/2010 11:37 AM, Dale Henrichs wrote:

> I've just noticed that in GRSmallDictionary>>hash, the hash of the class
> is used for calculating the object's hash and I just wanted to point out
> that that is not portable (at least relative to GemStone).
>
> In GemStone there is the notion of class histories, which means that
> there are multiple versions of a class which means that the hash of a
> class cannot be counted on to be constant for a given class, which means
> that it shouldn't be used in hashes...
>
> Dale
> _______________________________________________
> seaside-dev mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev

Check that ... it looks like GRSmallDictionary>>hash has been removed in
a later version...

Doesn't change the fact that using a classes hash is not portable to
GemStone:)

Dale
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev