• 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: the underscore naming convention
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: the underscore naming convention


  • Subject: Re: the underscore naming convention
  • From: Rosyna <email@hidden>
  • Date: Sun, 28 Aug 2005 07:53:27 -0700

http://developer.apple.com/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingBasics.html

"Avoid the use of the underscore character as a prefix meaning private, especially in methods. Apple reserves the use of this convention. Use by third parties could result in name-space collisions; they might unwittingly override an existing private method with one of their own, with disastrous consequences. See "Private Methods" for suggestions on conventions to follow for private API."

But the naming guidelines (and all style guidelines, actually) are hard to follow. One section will often seem to contradict another section of the guidelines.



Ack, at 8/28/05, Jeff Childers said:

I have been looking at some palette examples the instances are defined prefixed with a underscore.
I read somewhere that apple uses this naming convention. Are the these developers just trying to write there code like apple or is there other reasons as well?

--


Sincerely, Rosyna Keller Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People

It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >the underscore naming convention (From: Jeff Childers <email@hidden>)

  • Prev by Date: Is "foo" the password of user "baz"?
  • Next by Date: NSFilePromisePboardType, NSTableView, NSOutlineView (and other views...)
  • Previous by thread: the underscore naming convention
  • Next by thread: Re: the underscore naming convention
  • Index(es):
    • Date
    • Thread