Liste des Groupes | Revenir à cl c |
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.
Les messages affichés proviennent d'usenet.