On Oct 4, 2013, at 9:59 AM, Matt Neuburg <m...@tidbits.com> wrote:

> But why is either of those necessary? Surely an id<MyCellDelegate> is, by 
> definition, an id - which inherits from NSObject

‘id’ is not a type that inherits from NSObject. ‘id’ is explicitly untyped.

‘id<MyCellDelegate>’ is _not_ untyped — its type is ‘any class that implements 
MyCellDelegate'. And unless that protocol inherits from the NSObject protocol, 
it does not include the -respondsToSelector: method.

This may seem inconsistent, but if ‘id<SomeProtocol>’ were really untyped, then 
you’d lose all type-checking for calls to it, so you could make typos like 
[cellDelegate foooo:] without any compile-time error.

—Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to