[squeak-dev] true hash

David T. Lewis lewis at mail.msen.com
Wed May 9 23:55:10 UTC 2012


On Wed, May 09, 2012 at 06:33:41PM -0500, Chris Muller wrote:
> > FWIW, on a 32-bit image:
> >
> > ??ImageFormat thisImageFileFormat asInteger ==> 6504
> > ??Smalltalk wordSize ==> 4
> > ??nil identityHash ==> 3840
> > ??true identityHash ==> 2950
> > ??false identityHash ==> 3152
> >
> > And on a 64-bit image:
> >
> > ??ImageFormat thisImageFileFormat asInteger ==> 68002
> > ??Smalltalk wordSize ==> 8
> > ??nil identityHash ==> 3840
> > ??true identityHash ==> 2950
> > ??false identityHash ==> 3152
> 
> This is very good news -- still, I see no harm in my proposal.  Why
> won't someone find some fault with it or at least acknowledge how
> horrible the failure-case scenario would be to debug..  :)

Nothing horrible is going to happen any time soon, but that does
not make it a good idea. true refers to an object like any other,
and there is no particular reason to expect that the object that
represents "true" in one image should have the same identityHash
as the object that represents "true" in another image.

Consider your multi-user client-server application example. Suppose
that it becomes fabulously successful and scales effortlessly to
support thousands of clients, and you later become interested in
permitting VisualWorks client images to join the party. Oops.

Dave



More information about the Squeak-dev mailing list