• 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: NSNull and @""
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNull and @""


  • Subject: Re: NSNull and @""
  • From: Andrew Farmer <email@hidden>
  • Date: Sat, 11 Oct 2008 02:51:34 -0700

On 10 Oct 08, at 19:28, Ian Joyner wrote:
So it's really a workaround for this situation. I think therefore there are several constructs to represent the same concept of "lack of presence" – nil, Nil, Null, and NSNull.

Fewer than you think, actually. nil, Nil, and NULL are all internally synonymous: the only difference is that nil and Nil have traditional meanings in ObjC. (nil is (id) NULL, and Nil is (Class) NULL). NSNull is the only odd case out - it's used in situations where a concrete object is needed, such as in collections.


Sorry, but NULL values need very careful reasoning and handling. (See C.J. Date "Database Systems" 5.6 Nulls (A Digression).) Thanks for your insights.

Null values in C (and C++ and ObjC) have much saner semantics than they do in SQL. In particular, comparisons with NULL aren't treated specially.


*: It's similar to integer 0 in some respects, but not fully interchangable._______________________________________________

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: NSNull and @""
      • From: "Michael Ash" <email@hidden>
References: 
 >NSNull and @"" (From: DKJ <email@hidden>)
 >Re: NSNull and @"" (From: Seth Willits <email@hidden>)
 >Re: NSNull and @"" (From: Ian Joyner <email@hidden>)
 >Re: NSNull and @"" (From: Seth Willits <email@hidden>)
 >Re: NSNull and @"" (From: Ian Joyner <email@hidden>)

  • Prev by Date: Re: NSNull and @""
  • Next by Date: Setting Minimum and Maximum width of Toolbar items
  • Previous by thread: Re: NSNull and @""
  • Next by thread: Re: NSNull and @""
  • Index(es):
    • Date
    • Thread