[GOODIE] invarAssn-raok

Tommy Thorn thorn at meko.dk
Thu Aug 29 02:07:09 UTC 2002


ok at cs.otago.ac.nz wrote:

>Adds InvariantKeyAssociation, a
>subclass of Association which can be
>safely used when the key must not be
>replaced."
>
Thanks for the goodie. Pardon my limitations, but the above descriptions 
leaves me with a few questions:

1) What exactly does it mean to replace the key?  I assume that it 
assumes the association itself as a mutable object where the key can be 
updated (which is not ok), whereas deleting a pair (k,v) and inserting a 
new (k',v) is ok?

2) What is the advantage of InvariantKeyAssociation / when should it be 
preferred?

Cheers,

  Tommy





More information about the Squeak-dev mailing list