MagmaCollection and MagmaCollectionIndex

Chris Muller afunkyobject at yahoo.com
Tue Oct 31 00:56:04 UTC 2006


You couldn't inherit Object>>#hash, the identity hash, because it is not unique or consistent between images.

If a class overrides with its own hash, I suppose you could use it but..  the hashes are used in where: query lookups and typically don't see querying on #hash:

    myCollection where: [ : each | each hash between: 123 and: 456 ]

because it does not seem very meaningful; except in a MagmaSet or MagmaDictionary perhaps?


----- Original Message ----
From: Hilaire Fernandes <hilaire2006 at laposte.net>
To: magma at lists.squeakfoundation.org
Sent: Monday, October 30, 2006 11:12:00 AM
Subject: MagmaCollection and MagmaCollectionIndex

Hello,

Looking at the MagmaCollectionIndex, I am wondering what could prevent
from using a general, default MagmaCollectionIndex implemented with the
method:

MaDefaultIndex>>indexHashForIndexObject: anObject
    ^ anObject hash

I am sure there are plenty of reason to not do so, but I am note sure about.

Hilaire

_______________________________________________
Magma mailing list
Magma at lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/magma






More information about the Magma mailing list