Re: enough of accessors - how about private method naming conventions in the real world?
Re: enough of accessors - how about private method naming conventions in the real world?
- Subject: Re: enough of accessors - how about private method naming conventions in the real world?
- From: Nicholas Riley <email@hidden>
- Date: Wed, 7 Aug 2002 01:28:22 -0500
- Mail-followup-to: "Michael B. Johnson" <email@hidden>, email@hidden
On Tue, Aug 06, 2002 at 10:48:45PM -0700, Michael B. Johnson wrote:
>
So we all know that Apple has coopted the "prefix your private methods
>
with an underscore" idiom, and told us not to use it. Annoyingly
>
enough, this is fair, since we don't have source to the Apple
>
frameworks, and since any private methods one might implement using the
>
same naming convention would silently override their particular
>
implementation, leading to all sorts of nasty, hard to find bugs.
Actually, I didn't know this, where is it documented?
>
I do *not* want to do some sort of prefix akin to the class names (i.e.
>
renaming _foo in BARBigCoolClass as _BAR_foo), but I realize that I
>
need to publish whatever idiom I choose so that users of my classes now
>
have two naming schemes they must avoid - Apple's and mine.
That's what I've done in certain cases (when I'm adding categories to
arbitrary applications, say :-) Most of the time I'm not subclassing
any humongous Apple classes, anyway, so I wouldn't regard this as a
hardship. Although I tend to use BAR_foo instead of _BAR_foo.
--
=Nicholas Riley <email@hidden> | <
http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.