Re: unique class name in Cocoa UI?
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