• 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: [Obj-C] if (self) vs. if (self != nil)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Obj-C] if (self) vs. if (self != nil)


  • Subject: Re: [Obj-C] if (self) vs. if (self != nil)
  • From: Scott Ribe <email@hidden>
  • Date: Fri, 24 Feb 2012 13:55:39 -0700

On Feb 24, 2012, at 10:36 AM, Keary Suska wrote:

>> I also heard that generally speaking NULL is not necessarily always
>> equal to 0 on all architectures.
>
>
> I don't believe this is the case.

Actually it is--in fact there can even be multiple representations that are null, but again the language is specified to take care of making NULL pointers equivalent to 0 for comparing pointers to 0 and assigning constant 0 to pointers. It's not something most of us need to worry about: obscure embedded stuff, ancient segmented architectures, different size pointers to different data types, and other such madness.

--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice





_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


References: 
 >[Obj-C] if (self) vs. if (self != nil) (From: Oleg Krupnov <email@hidden>)
 >Re: [Obj-C] if (self) vs. if (self != nil) (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: Semi-Transient NSPopover disappearing when it shouldn't (10.7.3)
  • Next by Date: Re: [Obj-C] if (self) vs. if (self != nil)
  • Previous by thread: Re: [Obj-C] if (self) vs. if (self != nil)
  • Next by thread: Re: [Obj-C] if (self) vs. if (self != nil)
  • Index(es):
    • Date
    • Thread