Re: dynamic binding in initializers
Re: dynamic binding in initializers
- Subject: Re: dynamic binding in initializers
- From: Andy Lee <email@hidden>
- Date: Fri, 25 Feb 2011 08:13:40 -0500
On Feb 24, 2011, at 10:21 AM, Roland King wrote:
> It seems if I have a method I really don't want to be dynamic, I should call it a class-specific name (which I just did, my internalInit is now internalInit_MyClass, ugly though)
This is the approach I take. Granted it's ugly, but at least it's privately ugly (you aren't uglifying your class's public API), and the name is slightly more intention-revealing ("this code is only for this class"). *Because* the name is ugly, anyone skimming the code can tell it's doing something out of the ordinary.
I hadn't thought of using functions -- good to have an option to consider in the future -- but offhand it seems I'd prefer a method so I have the option of calling super and so that I can use Objective-C syntax for arguments. These are minor considerations though.
--Andy
_______________________________________________
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