Re: NSDictionary key types
Re: NSDictionary key types
- Subject: Re: NSDictionary key types
- From: Murat Konar <email@hidden>
- Date: Thu, 6 Jan 2011 13:04:19 -0800
On Jan 6, 2011, at 12:43 PM, Quincey Morris wrote:
> The semantics of keys also requires them to be immutable (well, maybe that's the semantics of 'isEqual:')
The immutability requirement stems from needing to guarantee that keys in a dictionary are unique. If a key was mutable, it could be changed after a key-value pair was added to a dictionary, and if the new value of the key was "equal" to the value of another key, you'd have a borked dictionary.
_murat_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden