• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Lack of Initializers or Factory Methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Lack of Initializers or Factory Methods (From: Gordon Apple <email@hidden>)

  • Prev by Date: Key Paths @count and mutablestrings
  • Next by Date: Creating a Hyperlink in the UI
  • Previous by thread: Re: Lack of Initializers or Factory Methods
  • Next by thread: Re: Lack of Initializers or Factory Methods
  • Index(es):
    • Date
    • Thread