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: Georg Tuparev <email@hidden>
- Date: Wed, 7 Aug 2002 09:22:59 +0200
Wave,
This is a tough one. I spent a lot of time thinking how to solve this.
The problem is that I neither like the "_foo" (Apple) nor "_BAR_foo"
notation - it awakes hungarian notation sentiments ;-) From the other
side the danger of overriding unknowingly a private method is
significant (in our small universe there is a real name space
convergence).
What I ended up is a shell script (kind of integrated with emacs) that
makes class dump and looks for overridden methods. At the moment the
script is very dumb and reports also methods from the public API and
methods that explicitly call super's implementation - so I really use
this before code frees, new Dev Tools release and if my programs start
behaving strangely. But one day (hopefully one_day <<
NSDistantFuture ;-) I will improve this script so that I can make it a
post-compile build phase....
cheers
-- georg --
On Wednesday, August 7, 2002, at 07:48 AM, Michael B. Johnson wrote:
So what do *you* do when you want to have private methods in classes
that you want to have the same freedom with (i.e. the clients of these
classes, even if they have access to the source, don't want to be able
to accidentally override your private methods).
Georg Tuparev
Tuparev Technologies
Klipper 13
1186 VR Amstelveen
The Netherlands
Mobile: +31-6-55798196
_______________________________________________
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.