Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site genrad.UUCP
Path: utzoo!watmath!clyde!floyd!harpo!eagle!mit-vax!grkermit!genrad!john
From: john@genrad.UUCP (John Nelson)
Newsgroups: net.unix-wizards
Subject: Re:  Please use NULL instead of 0 whenever you have a pointer!
Message-ID: <3811@genrad.UUCP>
Date: Wed, 1-Feb-84 10:31:28 EST
Article-I.D.: genrad.3811
Posted: Wed Feb  1 10:31:28 1984
Date-Received: Wed, 8-Feb-84 02:26:55 EST
References: <16022@sri-arpa.UUCP>
Organization: GenRad, Bolton, Mass.
Lines: 17

After hearing all the controversy that NULL is identically equal to zero,
the only sane solution is to fix the C language.  Add a special constant
that is the equivalent of zero, but is a pointer.  Since NULL already has
bad connotations, let's borrow from PASCAL, and call it NIL.

Now NIL is guaranteed to be a pointer of the largest type (char * ?) but
it will compare against any pointer without error and it can be passed
as a subroutine argument.  NIL can be assigned to any pointer type, and
will always be guaranteed to be different than a valid pointer.

It would be nice if the definition of NIL included the restriction that
a dereference of NIL would always cause a run-time error, but maybe this
is too much to ask for.

Those of us without the "fixed" compiler can #define NIL ((char *) 0)
and use it anyway (although some of the compilers may complain about
"illegal pointer combination"s)