logo       

Re: [GOODIE] invarAssn-raok: msg#01306

lang.smalltalk.squeak.general

Subject: Re: [GOODIE] invarAssn-raok

ok@xxxxxxxxxxxxxx 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






<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise