> In addition to what Kyle replied, I'd just like to point out that prefixing 
> your *methods* with an underscore is a very bad idea, since Apple does 
> reserve such names and a conflict will bite you at runtime possibly affecting 
> the binary compatibility of your app.

I would argue that underscores are fine to use, but only for the purpose of 
distinguishing "private" or "internal" methods, not namespaces.  If you are 
subclassing a class you don't control (other than NSObject or similar) you 
should prefix your methods with your own identifier, just like you would your 
class name.  This also extends to protocols and delegate methods.  I've 
encountered some rather interesting bugs due to Apple frameworks adding new 
methods with the same names, irrelevant of whether underscores are involved or 
not.  I assure you, Apple won't blink first in these cases. :)
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to