Sujet : Re: question about nullptr
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 10. Jul 2024, 16:28:54
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v6m9bn$1vbsi$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 09.07.2024 00:55, Ben Bacarisse wrote:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
On 08.07.2024 18:23, Ben Bacarisse wrote:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>
On 08.07.2024 12:18, Ben Bacarisse wrote:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>
What's superfluous to one is useful for others (e.g. for grep'ing
occurrences of a null-pointer value in source codes);
>
This is been suggested twice now but I'm struggling to see why that is
useful. I can see management wanting one to find all uses of a null
pointer constant to check that they have all been replaced by the
"safer" nullptr, but what's the value in searching for nullptr?
>
Bug-tracking.
>
Can you say more?
>
Frankly, no. [...]
OK.
So the text you snipped from my reply did not trigger any insight?
Another, last try...
Compare it to 'enum' constants. When I code or debug I want to track
(search and find) them by name not by integer number.
Similar with the 'enum' bool type we introduced (when there was not
yet a bool type existing in C or C++) with literal constants 'true'
and 'false'. (Only two values, but still as important.)
Similar with the dedicated pointer value 0 (these days we used the
literal 'null'). (Only one value, still useful for tracking eq/ne
comparisons and initializations.)
Janis