Re: alternate pattern for object initializers
Re: alternate pattern for object initializers
- Subject: Re: alternate pattern for object initializers
- From: "Hamish Allan" <email@hidden>
- Date: Mon, 26 May 2008 10:01:09 +0100
On Mon, May 26, 2008 at 8:25 AM, Stuart Malin <email@hidden> wrote:
> I guess I have. So, would a reasonable definition for "designated"
> initializer be: it is the initializer that calls the superclass's
> initializer?
I would define it as: the initializer that is guaranteed to be called
(directly or indirectly) by all other initializers. The purpose of
this is so that if a subclass needs to perform extra initialization,
it need only override the designated initializer to ensure that this
initialization is performed regardless of which initializer may be
called when the subclass is used.
But yes, because all other initializers end up calling it, it should
be the only initializer that calls the superclass's initializer.
Hamish
_______________________________________________
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