Re: The Unadopted Protocol
Re: The Unadopted Protocol
- Subject: Re: The Unadopted Protocol
- From: Quincey Morris <email@hidden>
- Date: Wed, 2 Jun 2010 10:23:25 -0700
On Jun 2, 2010, at 08:57, Matt Neuburg wrote:
> So this appears to be a technique for implementing a highly informal
> protocol.
What's the problem that this technique is intended to solve?
This is one of several techniques that can be used to send an arbitrary message to an arbitrary object without a compiler warning.
Note, though, that in the example you gave, 'testing' is a *private* method of MyClass (since MyClass chose not to put the method in its public @implementation), so you've violated MyClass's API contract. If 'testing' really is private, invoking it externally seems like a bad idea. If it's really public, declaring it so (in MyClass.h) seems like a good idea.
_______________________________________________
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