Re: Interpreting Documentation: Is a nil argument OK?
Re: Interpreting Documentation: Is a nil argument OK?
- Subject: Re: Interpreting Documentation: Is a nil argument OK?
- From: Erik Buck <email@hidden>
- Date: Sun, 24 Jul 2005 13:26:33 -0400
I am on shaky ground because one counter example may invalidate my
advice, but here it is anyway.
There is no prohibition on sending messages to nil in Objective-C.
You just can't rely on the return value from sending messages to nil
if the expected return value is not an object pointer such as id.
There is also no problem passing nil as an argument to a message
unless the documentation warns against it and/or standard C pointer
arithmetic is involved as with methods that require pointers to
pointers.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden