remove: and GOODS -- identity problems?

Ragnar Hojland Espinosa ragnar.hojland at linalco.com
Fri Jul 9 23:46:56 UTC 2004


On Fri, Jul 09, 2004 at 04:22:31PM -0700, Avi Bryant wrote:
> 
> 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.

Hmm.. I am a bit confused;  since the result from #select: would be
objects that are already present in the database, I can't see why it
would force anything?

-- 
Ragnar Hojland - Project Manager
Linalco "Specialists in Linux and Free Software"
http://www.linalco.com  Tel: +34-91-4561700



More information about the Squeak-dev mailing list