Let's define our own NULL

Mark Stevans mark at navtech.uucp
Thu Jun 23 04:55:50 AEST 1988


Back in the days when I was a contract C programmer, I once got into a
disagreement over the advisability of the following idea:

	"Let's define NULL in our product-wide header file like so:

		#ifndef NULL
		#define NULL	0
		#endif

	That way, if someone needs NULL but doesn't need to use the standard
	I/O library, he won't need to pull in <stdio.h>."

Personally, I strongly disfavor this idea for reasons that I will not list
here for reasons of impartiality.  If you disagree with me, please educate
me as to why this might be a good idea.  If you agree with me, please give
me some definitive and convincing arguments to use if and when I run across
this again somewhere.  Thanks for your views either way.

						Mark "Stubborn" Stevans



More information about the Comp.lang.c mailing list