Re: Why so many public properties all up in my grizzle?
Re: Why so many public properties all up in my grizzle?
- Subject: Re: Why so many public properties all up in my grizzle?
- From: Jens Alfke <email@hidden>
- Date: Fri, 16 Mar 2012 15:53:30 -0700
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 (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