On Mar 16, 2012, at 2:57 PM, Eeyore wrote:

> So simply hiding the actions in the implementation doesn't protect you from 
> finding out the method's name and calling it.

Well, sure. If you’re in the same process, there’s nothing protecting you from 
malicious code. The same goes for C++ or assembly; it’s just a little easier to 
find the method’s entry point in Obj-C because there’s more metadata.

The point of not declaring internal methods in the header isn’t for security, 
it’s to prevent accidentally using internal APIs in places where you shouldn’t. 
If a class considers property X as part of its internal state, then other code 
in the project shouldn’t use X, so you want to make sure that accidentally 
referring to X produces a compile 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