| Deutsch English Français Italiano |
|
<87y166jh60.fsf@bsb.me.uk> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse <ben@bsb.me.uk> Newsgroups: comp.lang.c Subject: Re: question about nullptr Date: Sat, 13 Jul 2024 00:59:19 +0100 Organization: A noiseless patient Spider Lines: 38 Message-ID: <87y166jh60.fsf@bsb.me.uk> References: <v6bavg$3pu5i$1@dont-email.me> <20240706054641.175@kylheku.com> <v6bfi1$3qn4u$1@dont-email.me> <l9ciO.7$cr5e.2@fx05.iad> <877cdyuq0f.fsf@bsb.me.uk> <2ckiO.19403$7Ej.4487@fx46.iad> <87plrpt4du.fsf@bsb.me.uk> <9bCiO.7108$sXW9.3805@fx41.iad> <87jzhwu5v9.fsf@bsb.me.uk> <20240708001722.280@kylheku.com> <v6gab6$qdd2$1@dont-email.me> <878qyctcdt.fsf@bsb.me.uk> <v6gf23$r5pf$1@dont-email.me> <8734ojua2s.fsf@bsb.me.uk> <v6h9su$vkip$1@dont-email.me> <87sewjsdc5.fsf@bsb.me.uk> <v6m9bn$1vbsi$1@dont-email.me> <87cynkommh.fsf@bsb.me.uk> <v6r6c7$3122q$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Sat, 13 Jul 2024 01:59:19 +0200 (CEST) Injection-Info: dont-email.me; posting-host="4e5d3404761aff5fd06f2da3e1d5fb25"; logging-data="3413147"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+8eIKc2GEHQ6DXdlh4NCTzp30yEgpgkkY=" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:RptAtTWFUUvG4+G6mrRaUp9+7SE= sha1:Y9uFewUJi6/XOByFBkSnhYHEXxk= X-BSB-Auth: 1.b82f589a8d327362575d.20240713005919BST.87y166jh60.fsf@bsb.me.uk Bytes: 3310 Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes: > 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. Yes, that's been the clear for a while now. That's why, when you said you could not say more, I was happy to leave it at that (my "ok"). -- Ben.