Our Blessed C26 Versus Their Barbarous C89
Description
A Tom Gauld-style cartoon of two fortified hills facing each other across a river, each with watchtowers, flags, and a small sailboat, parodying medieval tribal warfare with C language standards. The left side is labeled 'OUR BLESSED C26' with features annotated as 'our glorious defer', 'our great _Generic', 'our noble true/false keyword', and 'our heroic nullptr'. The right side is 'THEIR BARBAROUS C89' with 'their wicked goto', 'their primitive void *', 'their backward 1/0', and 'their brutish NULL'. The meme satirizes language-standard holy wars, framing modern C (C23/C26 features like defer and nullptr) as civilization and K&R-era C89 idioms as barbarism - while both camps remain, of course, the same language separated by 37 years of committee work
Comments
30Comment deleted
Two kingdoms at war, yet both ship the same UB - the only thing C standards have deprecated successfully is each other's vocabulary
At last, `goto cleanup` has been refactored into a keyword with better public relations.
They actually added boolean without linking a lib? Or is it just named int constants? Comment deleted
it's in stdlib Comment deleted
oh actually, looks like it's a keyword since C23: https://en.cppreference.com/w/c/keyword/bool.html Comment deleted
sorry, I'm more familiar with C99 than the ones after Comment deleted
To be fair C99 seemed the last version ever for a long time. It seems the new features in C26 are mostly from one person pushing for C to be improved and legacy annoyances to be fixed Comment deleted
well … in my case I just don't really need anything beyond C99 Comment deleted
True Comment deleted
Nothing of that is really needed, they're mostly ergonomic improvements, same as being able to declare iteration variables within for loops in C99 Comment deleted
with that line of reasoning you might as well be writing in plain asm. I meant none of the newer features are useful to me personally Comment deleted
Whatever, pinch me when C++ modules are really supported Comment deleted
hopefully never Comment deleted
Why not? Comment deleted
modules are a disaster from compiler standpoint: there is a whole bunch of added complexity tied to intentionally forgetting parts of the compilation state to avoid conflicts, but that means they still behave essentially like TUs, so you don't actually get much perf benefit from using them anyway Comment deleted
I imagine that for c it's a non-issue, but then even proliferation of this stuff is harmful Comment deleted
pch always dealt with these issues properly, with the downside that there can only be one per TU, and it has to be at the very top, because that mechanism would actually dump the entire compilation state into the file, and then import that Comment deleted
And header files are such a joy to use? The solution to code reuse in c++/c is objectively ass and it's purely a reminder of its age and backwards compatibility. Comment deleted
well, header files are better, yes, because they allow you to just get rid of TUs entirely Comment deleted
I mean apart from ms Comment deleted
Pinging you. They are. Comment deleted
The main feature of C is universal support. New features are only supported on new compilers, so you might as well use any other modern language. Comment deleted
is universal support even true when undefined behavior is relied upon by many apps? Comment deleted
those that do merely aren't using this feature Comment deleted
and no one checked that _Generic isn’t actually a «generic» in the usual sense but rather a function overload for a finite number of types (defined by the user) it’s more like @singledispatch in Python Comment deleted
void* and there you go Comment deleted
no! Comment deleted
Imagine actually understand C before making jokes about it 🙄 Comment deleted
They finally have true/false keywords, the only thing I lacked in C Comment deleted
Defer in C??? Comment deleted