Re: Private Method?
Re: Private Method?
- Subject: Re: Private Method?
- From: Andrew Thompson <email@hidden>
- Date: Thu, 10 Nov 2011 00:01:45 -0500
Java, running with a byte code verifier and a strict security manager enabled does a reasonably through job of enforcing private methods at runtime. You can defeat it, but not typically with remotely loaded code such as applets.
It's a continuum of design choices in languages. You're right that it has a lot to do with communicating intent to other programmers, but it can also be enforced.
On Nov 7, 2011, at 8:33 PM, Graham Cox <email@hidden> wrote:
>
> On 08/11/2011, at 12:16 PM, Don Quixote de la Mancha wrote:
>
>> no method would be private.
>
>
> True, but Public/Private is really more of a way to organise your code for its use by other humans. The compiler can enforce it to a degree, but the real reason for having private methods is to hide them from users of your code.
>
> --Graham_______________________________________________
>
> 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
_______________________________________________
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