Modern C is awesome!
Some new features that I care about in C23 and C29
ยท programming, C
Was reading the Wikipedia article for C23 and C29 (planned). Found some interesting features that I care about:
C23
autokeyword to automatically infer types of variables (functions not supported)trueandfalseas keywords, withoutstdbool.htypeof()to give you the type of a variableconstexprfor compile-time constants (no more macro abuse)nullptrkeyword that can be used in place ofNULL_BitInt(N)to give you at leastNsized integers
C29
_Countofkeyword andcountofmacro that determine the number of elements of an array (no need forsizeof(arr)/sizeof(arr[0])now)deferkeyword and blocks for cleanup!caseranges likecase 1 ... 3:
Obviously, there a ton more which I don't know/use. GCC 15 and Clang 19 already include an experimental flag to enable support for C29. Time for another recreational programming session soon.