Re: Wisdom of overriding isEqual:
Re: Wisdom of overriding isEqual:
- Subject: Re: Wisdom of overriding isEqual:
- From: Patrick Machielse <email@hidden>
- Date: Wed, 10 Mar 2004 22:35:54 +0100
op 10-03-2004 15:46 schreef Glenn Andreas
>
At 1:33 PM +0100 3/10/04, Patrick Machielse wrote:
>
>
>
> Recently I've been thinking about overriding the isEqual: message on
>
> standard Cocoa classes, and I'm curious if there is any 'danger' in doing
>
> so.
>
>
>
> At least, this is what I expect. The documentation of NSObject won't tell
>
> me how this NSObject Protocol message is really implemented. Strange...
>
>
>
One thing to remember is that Protocols _don't_ implement things.
>
They are just an interface, and nothing more - no code (it should
>
only describe "what" and not "how")
I am fully aware of this situation :-)
My 'gripe' is that NSObject claims to implement the NSObject protocol and
therefore the 'isEqual:' method, but that the documentation refuses to say
_how_.
In absence of documentation isEqual is a black box; the only way to tell if
two objects are equal is to call isEqual:, you really cannot know in advance
if two instances are equal.
Patrick
--
Hieper Software
w: www.hieper.nl
e: email@hidden
_______________________________________________
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.