Re: NSDictionary design bug (was: Re: Ugly bug in Foundation, beware!)
Re: NSDictionary design bug (was: Re: Ugly bug in Foundation, beware!)
- Subject: Re: NSDictionary design bug (was: Re: Ugly bug in Foundation, beware!)
- From: "Louis C. Sacha" <email@hidden>
- Date: Sun, 6 Jun 2004 17:31:53 -0700
Hello...
[stuff regarding the fact that NSObject's isEqual: is implemented as
== snipped]
Yes, precisely. I am not sure why you (and everyone else??) think
you have to explain this to me, because the sample code was
constructed to exploit/show this. I thought this was obvious, but
obviously not obvious enough.
Apparently the people at Apple (or back at Next?) who wrote the
documentation for NSDictionary thought that it was obvious that the
(thoroughly documented) fact that NSDictionary copies keys also
implicity requires that any object used as a key implement isEqual:
in a manner where an object and it's copy are equal.
But obviously, it's not obvious enough.
While I agree that some of the semantics used within the
documentation for NSDictionary are incorrect based on it's
implementation, the only real problem appears to be that you don't
like the way that NSDictionary is implemented. There isn't much that
anyone can do about that...
Louis
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.