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: Marcel Weiher <email@hidden>
- Date: Mon, 7 Jun 2004 17:46:02 +0100
On 7 Jun 2004, at 17:40, Nicko van Someren wrote:
On 7 Jun 2004, at 17:11, Marcel Weiher wrote:
Nicko: one of the reasons that the current implementation is broken
is that it *cannot* be fixed easily by subclassing!
That depends on what you call easy. It's trivial to do if you use a
wrapper class like this (typed in Mail.app):
That's a wrapper class. Not subclassing. Next.
Whereas the copying behavior *can* be added to a non-copying
implementation via subclassing.
It seems to me, looking at the documentation, that there are only two
extra messages that would have to be overridden to make the
non-copying version from what we have using the above wrapper class
(objectForKey: and keyEnumerator).
Yes. But in a subclass, -objectForKey: (and -setObjectForKey: ) are
precisely the methods you need from the superclass. And
-setObject:ForKey: does the copy. How are you going to un-copy that?
That was one of the original points I made.
It would really help if people would (a) read and (b) understand what
was written before responding.
I did read and understand your previous postings,
No you didn't, because we've already had the wrapper a couple of times
before.
I just happen to disagree with them.
You need to read + understand. Then you can disagree.
Cheers,
Marcel
_______________________________________________
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.