Re: Lack of Initializers or Factory Methods
Re: Lack of Initializers or Factory Methods
- Subject: Re: Lack of Initializers or Factory Methods
- From: Jim Correia <email@hidden>
- Date: Mon, 3 Nov 2008 14:40:41 -0500
On Nov 3, 2008, at 11:30 AM, Gordon Apple wrote:
Is "self" even defined for a class object?
`self` is the class object when you are in a class method.
If so, should case 1 (or similar) be the assumed implementation for
all of Cocoa? If not, then, IMHO, the docs in general should
specify which is is for each factory method.
You can't (safely) assume. Your contract with the class is the API
doc. In the case where the API doc is ambiguous or incorrect, the best
solution is to file a bug against the doc, and hope that someone on
the list can clarify ;-)
Jim
_______________________________________________
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