Deutsch   English   Français   Italiano  
<20240706054641.175@kylheku.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!3.eu.feeder.erje.net!feeder.erje.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Kaz Kylheku <643-408-1753@kylheku.com>
Newsgroups: comp.lang.c
Subject: Re: question about nullptr
Date: Sat, 6 Jul 2024 12:54:26 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <20240706054641.175@kylheku.com>
References: <v6bavg$3pu5i$1@dont-email.me>
Injection-Date: Sat, 06 Jul 2024 14:54:26 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="fc51a894bcb0298b20f0a8b2608abe07";
	logging-data="4015095"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18QSJMjMz9zO51UHTSs/S0lYdnGedJIYyU="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:uKpze+4He0nFt1wMvepAlJM3Hck=
Bytes: 1658

On 2024-07-06, Thiago Adams <thiago.adams@gmail.com> wrote:
> If you were creating C code today and could use a C23 compiler, would 
> you use nullptr instead of NULL?

In greenfield projects under my dictatorship, I use 0, as in:

   char *p = 0;

I was still 20 something when I (easily) wrapped my head around the 0
null pointer constant, and have not had any problems with it.
Once I learned the standard-defined truth about null pointer constants,
and their relationship to the NULL macro, I dropped NULL like a hot
potato, and didn't look back (except when working in code bases that use
NULL).

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca