linux libio status

Peter Seebach seebs@monolith.solon.com
Wed Oct 15 16:51:00 GMT 1997


In message < 199710151812.LAA15748@cygnus.com >, Per Bothner writes:
>Joe Buck <jbuck@synopsys.com> writes:
>> The comp.lang.c++ tells users "don't use NULL in C++ programming",
>> precisely for this reason.

>I am strongly opposed to any such advice, or to anything that
>makes that advice necessary.

Amen!

>Using NULL instead of 0 makes programs clearer, and is strongly
>to be encouraged.

It also makes a non-empty set of programs *correct*.

However, correctness aside, it is good to use NULL for null pointers,
for the same reason it is good to use "hello, world" rather than
{ 'h', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd' }
to initialize arrays of characters.

(One point extra credit for spotting the difference, two points
extra credit for spotting the case where the two are not different.)

-s



More information about the Gcc mailing list