Path: csiph.com!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c++
Subject: Re: Is EXIT_SUCCESS/EXIT_FAILURE necessary?
Date: Sun, 01 Dec 2024 21:00:20 -0800
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <864j3mof17.fsf@linuxsc.com>
References: <8463694f3a751b287c857fca181451f36eeee982.camel@gmail.com> <6OG%O.12794$vGnb.894@fx46.iad> <871pz3ngzb.fsf@nosuchdomain.example.com> <87mshnkm8q.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Mon, 02 Dec 2024 06:00:21 +0100 (CET)
Injection-Info: dont-email.me; posting-host="e9252777fbfdbb5b036d5be7e0226fe4"; logging-data="3265320"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+mgfO2v2eibcsBTmYiKwqzD6uC+PUYUi4="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:sa2jvmAMWrf6Hc516FD5Vzwm3J0= sha1:N2I5epw0+GaFUuvE7nQD3tieyZs=
Xref: csiph.com comp.lang.c++:121119
Keith Thompson writes:
> Keith Thompson writes:
> [...]
>
>> In my opinion, the main reason for NULL is that it lets the
>> programmer explicitly state that it's a null pointer constant and
>> not just zero. (But NULL can still be of type int.) I find
>> nullptr (in C++ and C23) an improvement over NULL.
>
> To summarize, the purpose of using NULL rather than 0 is to
> communicate information to the human reader, [...]
That is one purpose for using NULL, but it doesn't have to
be the only one.