• 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: unique class name in Cocoa UI?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unique class name in Cocoa UI?


  • Subject: Re: unique class name in Cocoa UI?
  • From: Andrew Kimpton <email@hidden>
  • Date: Tue, 26 Oct 2004 21:39:16 -0700

Steve Checkoway wrote:

On Oct 26, 2004, at 6:45 PM, Brian Willoughby wrote:

With Objective C, the standard recommended practice is to prefix your class
names with your company (or personal) initials. My library classes start with
"SC" for "Sound Consulting," and you'll see many classes which begin with "NS"


I also prefix my classes with SC (for rather obvious reasons). I don't think that prefixing one's classes with initials is a very good idea.

Assuming that we are all good programmers and write reusable code that we share with everybody else and assuming that we all follow Apple's naming guidelines, we have 26^2=676 possible choices for class prefixes. Of course, if there are less than 700 people writing Objective-C code than we (and Apple) have far greater problems. There really needs to be a better solution.

I seem to recall - though my memories a little fuzzy. That the two-level namespace mechanism introduced in 10.1 was specifically designed to deal with the scenario of overlapping symbol names, especially in Obj-C apps which are most vulnerable due to their dynamic dispatch mechanisms.

http://developer.apple.com/releasenotes/DeveloperTools/TwoLevelNamespaces.html seems to be the full rundown

- Steve


Andrew 8-)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: unique class name in Cocoa UI?
      • From: kelly jacklin <email@hidden>
References: 
 >unique class name in Cocoa UI? (From: Hidetomo Katsura <email@hidden>)
 >Re: unique class name in Cocoa UI? (From: Robert Grant <email@hidden>)
 >Re: unique class name in Cocoa UI? (From: Brian Willoughby <email@hidden>)
 >Re: unique class name in Cocoa UI? (From: Steve Checkoway <email@hidden>)

  • Prev by Date: Re: unique class name in Cocoa UI?
  • Next by Date: Re: unique class name in Cocoa UI?
  • Previous by thread: Re: unique class name in Cocoa UI?
  • Next by thread: Re: unique class name in Cocoa UI?
  • Index(es):
    • Date
    • Thread