Re: [Obj-C] if (self) vs. if (self != nil)
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: Sat, 25 Feb 2012 07:22:49 -0700
On Feb 24, 2012, at 10:53 PM, Kyle Sluder wrote:
> On Feb 24, 2012, at 2:07 PM, Scott Ribe <email@hidden> wrote:
>
>> On Feb 24, 2012, at 10:52 AM, Wade Tregaskis wrote:
>>
>>> Though technically speaking it's true, and is thus an argument for actually using NULL rather than 0
>>
>> No, it's not such an argument at all. The compiler guarantees that null pointers converted to int become 0,
>
> No it very much doesn't. See my citations.
I saw your citations. You're ignoring the "Except as previously specified" clause at the beginning of the sentence you quote. Null pointers converted to int become 0; other pointers are implementation defined.
--
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