Re: Block error
Re: Block error
- Subject: Re: Block error
- From: Scott Ribe <email@hidden>
- Date: Fri, 15 Jul 2011 18:05:07 -0600
On Jul 15, 2011, at 5:38 PM, Rick Mann wrote:
> ...except I feel like nil should always work.
Well, that's just a historical problem with C, lack of a null pointer. So instead we get nil which is really just a shortcut for (void*)0, and so only works where void* works, which varies somewhat between K&R C, ANSI C, and C++, and may well require an explicit typecast in some situations where it is a return value mixed with return values of other pointer types. On the other hand, we have NULL, which is often 0 *without* the cast, and may be usable in some situations where void* is not, but is prone to unfortunate effects when calling overloaded functions.
(Thus C++11X gives us nullptr; who knows how that will interact with Objective-C...)
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden