C23 – a revision of the C standard – is finished according to ISO project editor JeanHeyd Meneide, though it is technically still a working draft prior to its planned publication next year (hence C23).
Specifically, Meneide wrote after the C23 meeting last month that:
“This report is after the very last C23 meeting in which documents can be ratified for C23 … this means no new real work will be applied asides from whatever National Bodies attempt to force in through National Body Comments, or if we notice a gob-smacking, computer-breaking bug in the standard that needs to be fixed.”
Meneide highlighted new features including constexpr which (unlike const) guarantee that an object is a constant expression; storage classes for compound literals; variadic parameter lists; modern bit utilities that he states are not so much “modern” as “catching up to 40-50 years ago”; and type inference for object definitions. This last means coders can write:
auto i = 1;
and the compiler will type i as an int.
C23, not to be confused with C++23, is the first update since C17, and C17 changed little from C11. The language has evolved slowly, with C developers prizing its stability, relative simplicity, efficiency and small runtime. Despite its age – the language got its name in 1972 – it remains critical to modern computing, and is the main language used to code the Linux kernel and countless other low-level projects.
Considering that context, there is a lot new in C23, as well as the removal of certain things including “Kernigan and Ritchie” function declarations and definitions, nicely described here, which have been agreed to be undesirable for decades but until now have remained part of the standard.
Despite this move, Meneide said that “the chances of GCC or Clang actually removing K&R declarations is close to 0%. They would need to remove the
-std=c89 flag, and every flag from then until -std=c23. It’s never going to happen.”
Meneide expressed some satisfaction with what has made it into the C23 standard but also frustration at the process. “It’s absolutely bananas this is how ISO-based, Committee-based work has to be done. To all the other languages eyeing the mantle of C and C++, thinking that an actual under-ISO working group will provide anything to them. Do. Not,” he said in his post.
That remark goes some way to explain why Google software engineers have created a new language, Carbon, as a hoped-for successor to C++, since the developers cited the slow and indecisive progress of ISO C++ committees as one of the reasons for creating a new language based on the open source model.
That said, ISO is perhaps a good home for the C standard, where stability is such a key feature.