Sujet : Re: "A diagram of C23 basic types"
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.cDate : 02. Apr 2025, 18:29:24
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vsjs5k$2bfc5$2@dont-email.me>
References : 1 2 3 4 5 6 7 8
User-Agent : Mozilla Thunderbird
On 02/04/2025 17:38, bart wrote:
On 02/04/2025 16:26, Muttley@DastardlyHQ.org wrote:
On Wed, 2 Apr 2025 16:59:45 +0200
David Brown <david.brown@hesbynett.no> wibbled:
On 02/04/2025 16:05, Muttley@DastardlyHQ.org wrote:
I suspect the people who are happy with C never have any correspondence with
anyone from the committee so they get an entirely biased sample. Just like
its usually only people who had a bad experience that fill in "How did we do"
>
surveys.
>
And I suspect that you haven't a clue who the C standards committee talk
to - and who those people in turn have asked.
>
By imference you do - so who are they?
>
11. nullptr for clarity and safety.
>
Never understood that in C++ never mind C. NULL has worked fine for 50 years.
And it's been a hack for 50 years. Especially when it is just:
#define NULL 0
The common definition in C is :
#define NULL ((void*) 0)
Some compilers might have an extension, such as gcc's "__null", that are used instead to allow better static error checking.
(In C++, it is often defined to 0, because the rules for implicit conversions from void* are different in C++.)
You also need to include some header (which one?) in order to use it.
<stddef.h>, as pretty much any C programmer will know.
I'd hope you wouldn't need to do that for nullptr, but backwards compatibility may require it (because of any forward-thinking individuals who have already defined their own 'nullptr').
No, nullptr is a keyword in C23.