On Aug 20, 2008, at 9:31 PM, Marcel Weiher wrote:

I was swayed by the "nil == foo" arguments for a while, but my gut kept tugging at me and now I have switched back to just if ( !foo), or better (I prefer positive ifs), if (foo). Of course, if all the if (foo) is protecting is a message-send, you can just leave it out altogether and let nil do its thing to messages...

For the sake of completeness (I know Marcel knows the rule), if you are using the return value of a message send, the value will be undefined depending on return type when sending a message to nil. See the runtime documentation for details.

Jim
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to