• 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: argument checks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: argument checks


  • Subject: Re: argument checks
  • From: Jerry Krinock <email@hidden>
  • Date: Thu, 12 Jun 2008 05:18:26 -0700


On 2008 Jun, 12, at 0:47, Chris Suter wrote:

On 12/06/2008, at 5:29 PM, Graham Cox wrote:
... implicitly allowing nil, unless it is specifically documented otherwise.

Can you give me a counter-example?

-[NSDictionary setObject:forKey:]
-[NSMutableArray addObject:]

[These] raise exceptions if you pass in nil.

However, these results are now documented! I believe they were not documented a couple years ago. I and probably many others filed bugs on this.


But I've noticed "must not be nil" comments appearing in Apple documentation over the last couple years.

So, I would say that Graham is correct about the requirement for documentation, although probably there still may be omissions (bugs) in older Apple docs.

_______________________________________________

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: 
 >argument checks (From: Ashley Perrien <email@hidden>)
 >Re: argument checks (From: Graham Cox <email@hidden>)
 >Re: argument checks (From: Chris Suter <email@hidden>)
 >Re: argument checks (From: Graham Cox <email@hidden>)
 >Re: argument checks (From: Chris Suter <email@hidden>)

  • Prev by Date: Re: argument checks
  • Next by Date: FSEvent- FSEventStreamEventFlags
  • Previous by thread: Re: argument checks
  • Next by thread: Re: argument checks
  • Index(es):
    • Date
    • Thread