• 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
Convention for class name prefixing . . .
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Convention for class name prefixing . . .


  • Subject: Convention for class name prefixing . . .
  • From: "Michael A. Crawford" <email@hidden>
  • Date: Thu, 16 Jul 2009 12:14:22 -0400

So, what is the convention? I assume I should prefix my class names so that I minimize potential for name space conflict, but what should I use as a prefix? The options readily available to me are:

1) Developer or company name
2) Application or framework name

Given that I have a Protocol Engine app or framework with a class called ProtocolDatabase, I would have the following options:

MCProtocolDatabase
MACProtocolDatabase
CDEProtocolDatabase
PEProtocolDatabase

Using my name 'Michael A. Crawford' or my company name 'Crawford Design Engineering' or the app name 'ProtocolEngine'.

Should the prefix be limited to a certain number of characters? 2 or 3, for example. Or, is it acceptable to use a higher number (4 or 5) of characters in the prefix?

I'm used to namespaces, which I use in C++ and used to use when writing C# code.

Discussion?

Thanks.

-Michael
----------------------
The united stand.  The divided get played.

-- Bernie MAC




Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Follow-Ups:
    • Re: Convention for class name prefixing . . .
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: Printing a View [solved]
  • Next by Date: Re: Problems displaying an image in UIWebView
  • Previous by thread: Re: Printing a View [solved]
  • Next by thread: Re: Convention for class name prefixing . . .
  • Index(es):
    • Date
    • Thread