• 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: == nil vs. isEqual:nil
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: == nil vs. isEqual:nil
      • From: Jonathan Hendry <email@hidden>
References: 
 >Re: == nil vs. isEqual:nil (From: Andreas Monitzer <email@hidden>)

  • Prev by Date: Re: Searchable Archives Are Here
  • Next by Date: Re: EOF Advocacy, Open Source?
  • Previous by thread: Re: == nil vs. isEqual:nil
  • Next by thread: Re: == nil vs. isEqual:nil
  • Index(es):
    • Date
    • Thread