Sujet : Re: "A diagram of C23 basic types"
De : Muttley (at) *nospam* DastardlyHQ.org
Groupes : comp.lang.cDate : 02. Apr 2025, 16:12:20
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vsjk4k$24q5m$1@dont-email.me>
References : 1 2 3 4 5 6
On Wed, 2 Apr 2025 11:12:07 -0300
Thiago Adams <
thiago.adams@gmail.com> wibbled:
Em 4/2/2025 11:05 AM, Muttley@DastardlyHQ.org escreveu:
So what exactly is better / faster / clearer / safer in C23?
>
We already had some C23 topics here.
My list
>
- #warning (better)
- typeof/auto (better only when strictly necessary)
Auto as per C++ where its used as a substitute for unknown/long winded
templated types or in range based loops? C doesn't have those so there's no
reason to have it. If you don't know what type you're dealing with in C then
you'll soon be up poo creek.
- digit separator (better, safer)
Meh.
- binary literal useful
We've had bitfields for years which cover most use cases.
- #elifdef, OK not a problem, not complex..
- _has_include useful
- [[nodiscard]] safer (although I think it could be better defined)
- static_assert no param (clear)
Meh.