Sujet : C23 thoughts and opinions
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.cDate : 22. May 2024, 17:55:36
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v2l828$18v7f$1@dont-email.me>
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0
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.
<
https://open-std.org/JTC1/SC22/WG14/www/docs/n3220.pdf>
<
https://en.wikipedia.org/wiki/C23_(C_standard_revision)>
<
https://en.cppreference.com/w/c/23>
I like that it tidies up a lot of old stuff - it is neater to have things like "bool", "static_assert", etc., as part of the language rather than needing a half-dozen includes for such basic stuff.
I like that it standardises a several useful extensions that have been in gcc and clang (and possibly other compilers) for many years.
I'm not sure it will make a big difference to my own programming - when I want "typeof" or "chk_add()", I already use them in gcc. But for people restricted to standard C, there's more new to enjoy. And I prefer to use standard syntax when possible.
"constexpr" is something I think I will find helpful, in at least some circumstances.