Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Andrey Tarasevich Newsgroups: comp.lang.c Subject: Re: question about nullptr Date: Mon, 8 Jul 2024 21:49:10 -0700 Organization: A noiseless patient Spider Lines: 22 Message-ID: References: <20240706054641.175@kylheku.com> <877cdyuq0f.fsf@bsb.me.uk> <2ckiO.19403$7Ej.4487@fx46.iad> <87plrpt4du.fsf@bsb.me.uk> <9bCiO.7108$sXW9.3805@fx41.iad> <877cdwu9s1.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 09 Jul 2024 06:49:12 +0200 (CEST) Injection-Info: dont-email.me; posting-host="fb28d909938e85e71673212909d36277"; logging-data="1336358"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/uLfLyN4EYx5im7MDk1/5H" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:JiLuJQ0GFDomgukXtuJifetl2dM= Content-Language: en-US In-Reply-To: Bytes: 1860 On 07/08/24 9:45 PM, Andrey Tarasevich wrote: > > So, no. While I too prefer to use `NULL` for pointers and '\0' for > character constants, I realize that do it out of deep-seated habit, or > for nostalgic/luddite reasons mostly. Plain undecorated `0` as a > universal type-agnostic constant should really be my choice everywhere > today. .... although, one the second thought, one can probably start a Holy War about what a proper type-agnostic declaration of a `double` variable should look like double d = 0; or auto d = 0.0; -- Best regards, Andrey