Re: question about nullptr

Liste des GroupesRevenir à l c 
Sujet : Re: question about nullptr
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.c
Date : 12. Jul 2024, 14:08:38
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v6r6c7$3122q$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 11.07.2024 01:25, Ben Bacarisse wrote:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
[...]
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.)
 
Yes, you've said that before.  You want to search for nullptr.  I can't
think of how that might help find a real bug, if that's what you mean by
bug-tracking.
 
I was hoping for a story... "Once I had this bug where... and if I'd
been using nullptr I'd have found it a day earlier" kind of thing.  I'd
found a lot of bugs over the years, but I don't recall any that would
have been easier to find had I been able to search for nullptr.
 
I was looking for real-world insight here.  Obviously one could make up
a bug where p = nullptr; was written where, say, p = null - ptr; was
intended, but that's not what I mean.
 
Without such an example, your argument seems to be overly generic.

That's why I had problems to "explain" the reasons to you; because
it's so universal a property, so obvious (as I said), that I don't
know what else I could say. (Likewise with "real-word examples".)
What example could I give that explains that if you're looking for
specific dedicated semantical values it's easier to look them up
by [semantical] name than by a [ambiguous] number. Yes this speeds
up detection of errors when doing code inspections (for bugs or as
QA measure), and yes, this was helpful for program development and
bug detection in [my professional and private] practice.

Would you welcome the introduction of the keyword unity -- with the
value 1 and type int -- into C because one could then search for it?

No. (Please don't start to be ridiculous. - Or did you really miss
the point? - No offense intended.)

Janis


Date Sujet#  Auteur
6 Jul 24 * question about nullptr125Thiago Adams
6 Jul 24 +- Re: question about nullptr1Bonita Montero
6 Jul 24 +- Re: question about nullptr1John McCue
6 Jul 24 +* Re: question about nullptr104Kaz Kylheku
6 Jul 24 i+* Re: question about nullptr86Janis Papanagnou
6 Jul 24 ii+* Re: question about nullptr2Janis Papanagnou
6 Jul 24 iii`- Re: question about nullptr1Janis Papanagnou
6 Jul 24 ii+* Re: question about nullptr2Andrey Tarasevich
7 Jul 24 iii`- Re: question about nullptr1Tim Rentsch
6 Jul 24 ii+* Re: question about nullptr2bart
7 Jul 24 iii`- Re: question about nullptr1Keith Thompson
6 Jul 24 ii+* Re: question about nullptr9Chris M. Thomasson
6 Jul 24 iii+* Re: question about nullptr3Chris M. Thomasson
7 Jul 24 iiii`* Re: question about nullptr2Lawrence D'Oliveiro
9 Jul 24 iiii `- Re: question about nullptr1Chris M. Thomasson
6 Jul 24 iii+- Re: question about nullptr1Richard Damon
7 Jul 24 iii+* Re: question about nullptr3James Kuyper
7 Jul 24 iiii`* Re: question about nullptr2Keith Thompson
7 Jul 24 iiii `- Re: question about nullptr1Chris M. Thomasson
7 Jul 24 iii`- Re: question about nullptr1Lawrence D'Oliveiro
7 Jul 24 ii+- Re: question about nullptr1Kaz Kylheku
7 Jul 24 ii`* Re: question about nullptr69Ben Bacarisse
7 Jul 24 ii +- Re: question about nullptr1Tim Rentsch
7 Jul 24 ii +- Re: question about nullptr1Tim Rentsch
7 Jul 24 ii +- Re: question about nullptr1Kaz Kylheku
7 Jul 24 ii `* Re: question about nullptr65Ben Bacarisse
8 Jul 24 ii  +* Re: question about nullptr37Keith Thompson
8 Jul 24 ii  i+- Re: question about nullptr1Janis Papanagnou
8 Jul 24 ii  i+* Re: question about nullptr27Michael S
9 Jul 24 ii  ii+* Re: question about nullptr12Chris M. Thomasson
9 Jul 24 ii  iii`* Re: question about nullptr11Michael S
9 Jul 24 ii  iii `* Re: question about nullptr10Tim Rentsch
9 Jul 24 ii  iii  +* Re: question about nullptr6Thiago Adams
9 Jul 24 ii  iii  i+* Re: question about nullptr3Tim Rentsch
9 Jul 24 ii  iii  ii`* Re: question about nullptr2Thiago Adams
9 Jul 24 ii  iii  ii `- Re: question about nullptr1Tim Rentsch
10 Jul 24 ii  iii  i`* Re: question about nullptr2Kaz Kylheku
10 Jul 24 ii  iii  i `- Re: question about nullptr1Thiago Adams
9 Jul 24 ii  iii  `* Re: question about nullptr3Michael S
9 Jul 24 ii  iii   +- Re: question about nullptr1Tim Rentsch
9 Jul 24 ii  iii   `- Re: question about nullptr1David Brown
9 Jul 24 ii  ii+* Re: question about nullptr4Kaz Kylheku
9 Jul 24 ii  iii`* Re: question about nullptr3Michael S
9 Jul 24 ii  iii +- Re: question about nullptr1Kaz Kylheku
9 Jul 24 ii  iii `- Re: question about nullptr1Tim Rentsch
9 Jul 24 ii  ii`* Re: question about nullptr10Tim Rentsch
9 Jul 24 ii  ii `* Re: question about nullptr9Keith Thompson
9 Jul 24 ii  ii  +- Re: question about nullptr1Chris M. Thomasson
10 Jul 24 ii  ii  `* Re: question about nullptr7Tim Rentsch
10 Jul 24 ii  ii   `* Re: question about nullptr6Keith Thompson
11 Jul 24 ii  ii    +* Re: question about nullptr3James Kuyper
13 Aug 24 ii  ii    i`* Re: question about nullptr2Tim Rentsch
13 Aug 24 ii  ii    i `- Re: question about nullptr1Keith Thompson
13 Aug 24 ii  ii    `* Re: question about nullptr2Tim Rentsch
13 Aug 24 ii  ii     `- Re: question about nullptr1Keith Thompson
8 Jul 24 ii  i+- Re: question about nullptr1Keith Thompson
9 Jul 24 ii  i`* Re: question about nullptr7Andrey Tarasevich
9 Jul 24 ii  i +* Re: question about nullptr2Andrey Tarasevich
11 Jul 24 ii  i i`- Re: question about nullptr1Lawrence D'Oliveiro
9 Jul 24 ii  i `* Re: question about nullptr4Keith Thompson
10 Jul 24 ii  i  `* Re: question about nullptr3Tim Rentsch
10 Jul 24 ii  i   `* Re: question about nullptr2Keith Thompson
12 Aug 24 ii  i    `- Re: question about nullptr1Tim Rentsch
8 Jul 24 ii  `* Re: question about nullptr27Ben Bacarisse
8 Jul 24 ii   +* Re: question about nullptr24Kaz Kylheku
8 Jul 24 ii   i+* Re: question about nullptr22Janis Papanagnou
8 Jul 24 ii   ii+* Re: question about nullptr19Ben Bacarisse
8 Jul 24 ii   iii+* Re: question about nullptr12Janis Papanagnou
8 Jul 24 ii   iiii`* Re: question about nullptr11Ben Bacarisse
8 Jul 24 ii   iiii `* Re: question about nullptr10Janis Papanagnou
9 Jul 24 ii   iiii  `* Re: question about nullptr9Ben Bacarisse
10 Jul 24 ii   iiii   `* Re: question about nullptr8Janis Papanagnou
11 Jul 24 ii   iiii    `* Re: question about nullptr7Ben Bacarisse
12 Jul 24 ii   iiii     `* Re: question about nullptr6Janis Papanagnou
13 Jul 24 ii   iiii      +* Re: question about nullptr3Ben Bacarisse
13 Jul 24 ii   iiii      i`* Re: question about nullptr2Janis Papanagnou
15 Jul 24 ii   iiii      i `- Re: question about nullptr1Ben Bacarisse
13 Jul 24 ii   iiii      +- Re: question about nullptr1Janis Papanagnou
17 Jul 24 ii   iiii      `- Re: question about nullptr1Tim Rentsch
9 Jul 24 ii   iii`* Re: question about nullptr6Kaz Kylheku
9 Jul 24 ii   iii +- Re: question about nullptr1Chris M. Thomasson
9 Jul 24 ii   iii `* Re: question about nullptr4Ben Bacarisse
11 Jul 24 ii   iii  `* Re: question about nullptr3Chris M. Thomasson
11 Jul 24 ii   iii   `* Re: question about nullptr2Ben Bacarisse
11 Jul 24 ii   iii    `- Re: question about nullptr1Chris M. Thomasson
11 Jul 24 ii   ii`* Re: question about nullptr2Lawrence D'Oliveiro
12 Jul 24 ii   ii `- Re: question about nullptr1Janis Papanagnou
8 Jul 24 ii   i`- Re: question about nullptr1Richard Damon
8 Jul 24 ii   `* Re: question about nullptr2James Kuyper
9 Jul 24 ii    `- Re: question about nullptr1Kaz Kylheku
6 Jul 24 i+* Re: question about nullptr4bart
7 Jul 24 ii`* Re: question about nullptr3Lawrence D'Oliveiro
7 Jul 24 ii +- Re: question about nullptr1Keith Thompson
7 Jul 24 ii `- Re: question about nullptr1bart
12 Jul 24 i`* Re: question about nullptr13Richard Harnden
12 Jul 24 i +* Re: question about nullptr4Kaz Kylheku
13 Jul 24 i i`* Re: question about nullptr3Kaz Kylheku
13 Jul 24 i i +- Re: question about nullptr1James Kuyper
13 Jul 24 i i `- Re: question about nullptr1Keith Thompson
14 Jul 24 i +- Re: question about nullptr1Tim Rentsch
16 Jul 24 i `* Re: question about nullptr7Lawrence D'Oliveiro
6 Jul 24 `* Re: question about nullptr18Richard Damon

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal