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

Re: !foo vs foo == nil


  • Subject: Re: !foo vs foo == nil
  • From: "Clark Cox" <email@hidden>
  • Date: Thu, 21 Aug 2008 16:04:20 -0700

On Thu, Aug 21, 2008 at 3:56 PM, Scott Ribe <email@hidden> wrote:
>> It is an intentional omission (I have had this argument before on
>> comp.lang.c, except I was arguing your side at the time, and was set
>> straight).
>
> So, to be clear, there was at one time debate over whether null -> integer
> yields 0 should be in the standard, and in the end that was intentionally
> omitted?

As I understand it, yes (because, on platforms on which a null pointer
is not all-bits-zero, people wanted to convert that pointer to the
equivalent integer value)..

> So the error is in the editing--the stray "except as previously
> specified" was accidentally left in referring to nothing?

The "except as previously specified" in 6.3.2.3 5 refers back to
6.3.2.3 3. Without the "except as previously specified", 6.3.2.3 5
would directly contradict 6.3.2.3 3 (i.e. it would render the
conversion from a null pointer constant to a null pointer undefined).

>> Of course, this is, for the most part, all academic, as any platforms
>> on which Cocoa (or OpenStep APIs) exist all convert a null pointer to
>> zero and vice-versa.
>
> Yes. And the general evolution of things has been away from segmented/exotic
> addressing schemes to flat memory addressing. For good reasons, too ;-)

Indeed :)

--
Clark S. Cox III
email@hidden
_______________________________________________

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

  • Follow-Ups:
    • Re: !foo vs foo == nil
      • From: Scott Ribe <email@hidden>
References: 
 >Re: !foo vs foo == nil (From: "Clark Cox" <email@hidden>)
 >Re: !foo vs foo == nil (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: !foo vs foo == nil
  • Next by Date: Re: Design Question: Pro & Cons of KVC/KVO
  • Previous by thread: Re: !foo vs foo == nil
  • Next by thread: Re: !foo vs foo == nil
  • Index(es):
    • Date
    • Thread