remove: and GOODS -- identity problems?

Avi Bryant avi at beta4.com
Fri Jul 9 23:22:31 UTC 2004


On Jul 9, 2004, at 4:06 PM, Ragnar Hojland Espinosa wrote:

> I've fixed this with
>
> KKIdentitySet>>similarSpeciesInstance
>        ^ self species new instanceWithDatabase: database

That's probably fine.  Although this is simpler and possibly better:

KKIdentitySet>>species
	^ IdentitySet

The difference here is that the return value from #select: and 
#collect: and so on won't be suitable for storing in the database 
(you'd have to use something like ((KKIdentitySet database: db) addAll: 
(oldSet collect: [:ea | ...]))).  On the other hand, it doesn't force 
everything in the new set to be stored in the database either - for 
example, with your version, this:

mySetOfClassNames collect: [:ea | Smalltalk at: ea]

would try to store a bunch of Class objects on the next commit, which 
could be problematic.

Avi




More information about the Squeak-dev mailing list