Re: implement directly a protocol?
Re: implement directly a protocol?
- Subject: Re: implement directly a protocol?
- From: "John C. Randolph" <email@hidden>
- Date: Sat, 10 Nov 2001 06:51:30 -0800
On Saturday, November 10, 2001, at 06:38 AM, email@hidden wrote:
Is it permitted to implement directly a protocol?
Protocols are just a list of methods. Only Classes have methods, so
only clases can implement a protocol.
The reason I ask is that the compiler doesn't complain for:
@protocol A
@end
@implementation A
The effect of this is to declare a class and a protocol that are both
named "A". In the Foundation Framework, for example, there are both the
NSObject class, and the NSObject protocol.
-jcr
"The right to be heard does not include the right to be taken
seriously." - Hubert Humphrey