• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Private Method?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Private Method? (From: Bryan Harrison <email@hidden>)
 >Re: Private Method? (From: Jens Alfke <email@hidden>)
 >Re: Private Method? (From: Don Quixote de la Mancha <email@hidden>)
 >Re: Private Method? (From: Graham Cox <email@hidden>)

  • Prev by Date: Best way to determine whether iTunes is installed or not on Mac
  • Next by Date: Re: Changing the appearance of buttons
  • Previous by thread: Re: Private Method?
  • Next by thread: Re: Private Method?
  • Index(es):
    • Date
    • Thread