Re: why isn't id<MyCellDelegate> an id?
Re: why isn't id<MyCellDelegate> an id?
- Subject: Re: why isn't id<MyCellDelegate> an id?
- From: Marcel Weiher <email@hidden>
- Date: Fri, 04 Oct 2013 23:07:06 +0200
On Oct 4, 2013, at 20:30 , Tom Davie <email@hidden> wrote:
> Right, really the confusion stems from the fact that objective-c has a strange behaviour when dealing with the type “id”.
Actually, “id” is not “strange” at all. It just uses the very simple Smalltalk semantics: an object *always* responds to a message-send. One of those responses is to invoke the method “doesNotUnderstand:” or “forwardInvocation:” in Objective-C. At some point, Objective-C added *optional* static typing.
> The more mathematically correct thing to do...
It ain’t more correct, mathematically or otherwise...
> (and what it does for all other types) is “I don’t know what it is, so I can’t ‘prove’* anything at all about whether this is correct, therefore it’s not correct. Puny human, you must provide me with more information to make proofs”.
…and there ain’t no proofs either.
> My recommendation would be to file a radar about this, along with the fact that ids come up all the time, and show some support for wanting a language where the compiler can make more proofs for us.
Actually, the semantics have all the proof you need. If you want different semantics, there are PLENTY of languages that work the way you’d like, why don’t you use one of those?
Just sayin'
Marcel
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden