On May 8, 2010, at 8:12 AM, Kyle Sluder <kyle.slu...@gmail.com> wrote:

Now that we have blocks, I expect we'll be using a lot less of this, but with our current codebase it pays to be safe.


To be clear, I'm not suggesting that I check the return value of every -init call. Rather, I only check the ones that are likely to return nil. Often these are the ones that have error arguments.



But as far as implementing -init goes, I always check super's return value. After all, I'm reassigning self, so I've already potentially broken the guarantee of having a valid self pointer by virtue of being in an ObjC method. Why override good muscle memory for the special case of NSObject?

--Kyle Sluder
_______________________________________________

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 arch...@mail-archive.com

Reply via email to