• 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 Methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Private Methods


  • Subject: Re: Private Methods
  • From: Sean McBride <email@hidden>
  • Date: Tue, 18 Aug 2015 12:02:27 -0400
  • Organization: Rogue Research Inc.

On Tue, 18 Aug 2015 23:23:00 +0800, Maxthon Chan said:

>My own preference is to prefix private methods with underscores and the
>project’s class prefix.

That's exactly what you should not do.

Like the OP said, Apple's docs say that they reserve things starting with underscore for themselves.

Also, the C and C++ languages also reserve names that start with underscore and uppercase.  See ex:

<http://stackoverflow.com/questions/228783/what-are-the-rules-about-using-an-underscore-in-a-c-identifier>

If you're going to use a prefix: don't start with underscore!

Cheers,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada

_______________________________________________

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 Methods (From: Richard Charles <email@hidden>)

  • Prev by Date: Xcode warning from linking to a third-party framework in both app and in framework included in app?
  • Next by Date: Re: Thread-safe singleton with lazy initialisation
  • Previous by thread: Re: Private Methods
  • Next by thread: Re: Private Methods
  • Index(es):
    • Date
    • Thread