Re: Protocol implementation split between base and derived class
Re: Protocol implementation split between base and derived class
- Subject: Re: Protocol implementation split between base and derived class
- From: Christian Brunschen <email@hidden>
- Date: Wed, 8 Dec 2004 23:51:18 +0000
On 8 Dec 2004, at 23:15, Scott Hancher wrote:
You are correct. This would eliminate the compiler warning. However, I
want to leverage the compiler to warn me when I haven't implemented
all the protocol methods. Adding placeholder methods that throw an
exception would quiet the warning but would hide a potential error
that I would then have to uncover through more time consuming testing.
I would argue that my example Foo implements both of the FooProtocol
methods that it proclaims to conform to. The fact that one of the two
protocol methods is implemented on the base class it derives from is
immaterial.
How about you declare two protocols - one for the superclass, and one
for the subclass which just happens to include all the same methods as
the superclass' protocol?
++Scott.
// Christian Brunschen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden