This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Your 'Class <Protocol>' Work


zlaski@apple.com (Ziemowit Laski)  wrote on 29.09.04 in <F5816C3B-1244-11D9-BAE3-000393673036@apple.com>:

> On 28 Sep 2004, at 23.41, Kai Henningsen wrote:
>
> > zlaski@apple.com (Ziemowit Laski)  wrote on 28.09.04 in
> > <EEFE950A-11AF-11D9-8A9A-000393673036@apple.com>:
> >
> >> What is the difference between "declared by a root class" and
> >> "inherited by
> >> a root class"?  I was assuming the two are synonymous...
> >
> > I thought if it inherited *anything*, it *wasn't* a root class pretty
> > much
> > by definition?!
>
> I used "inherited" a bit loosely; what I (and David) should have said
> is "adopted". :-)  ObjC protocols
> get adopted by ObjC classes (much like Java interfaces get adopted by
> Java classes), but ObjC
> classes do not declare protocols.

The declare/adopt difference doesn't bother me, but inheritance - to me -  
means implementation, not just interface.

Or looking at it a different way, inheritance, in Objective C, is the hard  
part of the graph; protocols are the soft part, and categories are the  
hacky part [:-)].

MfG Kai


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]