Re: == nil vs. isEqual:nil
Re: == nil vs. isEqual:nil
- Subject: Re: == nil vs. isEqual:nil
- From: Mike Beam <email@hidden>
- Date: Wed, 15 Aug 2001 16:32:21 -0500
Hello All,
Thanks for all the replies. A couple of people pointed out that isEqual:nil
will not work since nil responds to most messages with "0", which would make
isEqual return NO even if the receiver were indeed nil. I din't think even
think of that before submitting my question. I think I'm a fan of
if ( anObject == nil )
As opposed to if(!anObject). I think it's more readable and explicit as to
what is being tested. But whatever works for you, right? So, thanks for
the replies!
Mike Beam