Hacker News new | past | comments | ask | show | jobs | submit login

Beware of C23 and later.

C is basically going into "we want C++ but without OOP and with templates done via _Generic".

Also LLVM and GCC aren't going to be rewritten from C++ into Rust anytime soon.




> Beware of C23 and later.

Beware of what? C23 fixed a number of issues. Sure, there are some oddballs (QChar and auto, mostly), but overall I think C23 is an improvement.


Those C89 hardliners have a different point of view.

Also there is the whole point Objective-C and C++ are much better than those improvements will ever be.


> Those C89 hardliners have a different point of view.

C89 was only a thing because Microsoft somehow decided to drag it's feet and prevented msvc from supporting anything beyond c89 for a long, long time. Only in 2020 did they manage to finally do something about it.

https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-...


Because for Microsoft C belonged into the past, it was about time to move into C++.

https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-an...

They only changed of point of view after Satya, and the whole Microsoft <3 Linux and Microsoft <3 FOSS pivot.

And in any case, blaming Microsoft doesn't really work out, as many of those folks don't even care Windows exists, only UNIX/POSIX platforms.


> Also LLVM and GCC aren't going to be rewritten from C++ into Rust anytime soon.

I'm afraid you underestimate the will power of rustaceans to find literally anything to rewrite.


I doubt Cranelift will ever match the only project that has beaten the contribution level of Linux kernel.


I imagine most C programmers are still using C99 or older anyway, particularly in the embedded space.


I'm not sure this is still true. I'm just a hobbyist but esp-idf, for example, supports C++23.


esp-idf is still on GCC 11, but most of the features of C23 are in GCC 13.


C99 or newer. You gotta have standard fixed size types like int16_t.


Not in the embedded space. When you've worked on embedded systems long enough, you learn that you have to accept the compiler that the vendor provided you with, and you adapt your codebase to the limitations of that compiler. This means working around code generation bugs, adding #ifdefs to define typedefs for things like int16_t if they don't exist.

That said, things are a lot better than they were 15 years ago, and the mainstream ARM compilers used today are leagues better than the barely functional cobbled together ports from the early '00s. ARM64 is a tier 1 platform, and there are enough users of the platform that the extended QA team that embedded developers were unintentionally part of in the past is no longer really the case (at least when it comes to the compiler).

However, there are still truly obscure architectures (mostly 8 bit and 16 bit) that continue to have oddball compilers. And you accept and deal with that insanity because it means you're only paying $0.01 for that microcontroller to blink an LED when some kind of an event occurs.


What part of C23 makes you believe this?


Everything that was taken from C++, and _Generic.

And the ongoing discussion for lambdas that didn't make it into C23, but still on the table for C2y.

Meanwhile, zero progress in what actually matters, proper strings and arrays, that aren't a continuous source of memory corruption bugs.


_Generic is from C11 though. For array I wonder people don't use them more. After all, array access can easily be bounded-checked in contrast to pointers. I essentially eliminated all my spatial memory bugs this way.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: