Re: Obj-C difference between NULL and nil
Re: Obj-C difference between NULL and nil
- Subject: Re: Obj-C difference between NULL and nil
- From: Wilfredo Sanchez <email@hidden>
- Date: Tue, 29 May 2001 11:40:51 -0700
On Saturday, May 26, 2001, at 09:46 AM, Brian Hill wrote:
#define NULL ((void*)0)
#define nil ((id)0)
Conceptually, there is a difference, but only to yourself and other
humans that read the code, the compiler doesn't care.
Some compilers are very strict about casting, in which case it would
matter. On the assumption that gcc is the only compiler you will ever
use, it won't matter, but that's a poor assumption long term.
I've heard that MetroWerks' compiler, for example, is more pedantic
than gcc, though I'm not sure if they would be in this case.
-Fred