Sujet : Re: C23 thoughts and opinions - why so conservative?
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 23. May 2024, 22:38:23
Autres entêtes
Organisation : None to speak of
Message-ID : <87ikz443ao.fsf@nosuchdomain.example.com>
References : 1 2
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Michael S <
already5chosen@yahoo.com> writes:
On Wed, 22 May 2024 18:55:36 +0200
David Brown <david.brown@hesbynett.no> wrote:
In an attempt to bring some topicality to the group, has anyone
started using, or considering, C23 ? There's quite a lot of change
in it, especially compared to the minor changes in C17.
>
Why C Standard Committee, while being recently quite liberal in field
of introducing new keywords (too liberal for my liking, many new things
do not really deserve keywords not prefixed by __) is so conservative
in introduction of program control constructs? I don't remember any
new program control introduced under Committee regime.
And I want at least one.
Which is?
New keywords are typically prefixed by an underscore and an upper case
letter, such as C11's "_Generic". There are no (standard) keywords
starting with "__".
Another area that was mostly unchanged since 1st edition of K&R is
storage classes. Even such obvious thing as removal of 'auto' class
took too long.
The automatic storage duration isn't going anywhere. The "auto" storage
class specifier has lost its old useless semantics in C23 and is used
for type inference.
If I am not mistaken, totally obsolete 'register' class
is still allowed. And I don't remember any additions.
The "register" keyword isn't entirely obsolete. It's a constraint
violation to take the address of a register object. It's also a hint
that access to an object should be as fast as possible, though such
hints are not as useful with modern optimizing compiler. I agree that
removing it wouldn't be a great loss (aside from requiring modifications
to existing code).
Personally I can think about at least two useful backward-compatible
additions in that area.
What are they?
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */