←back to thread

The C23 edition of Modern C

(gustedt.wordpress.com)
515 points bwidlar | 2 comments | | HN request time: 0.406s | source
Show context
israrkhan ◴[] No.41855279[source]
Most important aspect of C is its portability. From small microcontrollers to almost any computing platform. I doubt that any new version of C will see that much adoption.

If I want to live on cutting edge I would rather use C++2x or Rust rather than C.

Am I missing something? What benefit this supposedly modern C offers?

replies(7): >>41855343 #>>41855410 #>>41855595 #>>41855880 #>>41856401 #>>41858691 #>>41860058 #
vitaminka ◴[] No.41855343[source]
these features will eventually trickle down into the mainstream, kind of like C11 is doing at the moment

also, unless you're targeting embedded or a very wide set of architectures, there's no reason why you couldn't start using C23 today

replies(1): >>41855853 #
bboygravity ◴[] No.41855853[source]
Or in other words, for embedded and existing code: most use c99, some use c11 and nobody uses c23 until at least 10 years from now.
replies(2): >>41855978 #>>41855982 #
dhhfss ◴[] No.41855978[source]
This depends on the platform. Many embedded systems are based on arm these days and have modern toolchains available.

I cannot remember the last time I saw C99 used. C codebases generally use C11 or C17, and C++ code bases use C++20

replies(2): >>41856523 #>>41886801 #
pjmlp ◴[] No.41856523[source]
Unless you can vouch for the C++ compiler, the best C++ portable code can offer today is C++17.

Also 8 and 16 bit embedded toolchains are certainly not on C11 / C17, they can hardly afford full C89.

replies(1): >>41857834 #
1. flohofwoe ◴[] No.41857834[source]
SDCC is a niche C compiler for 8-bit CPUs and is more uptodate than MSVC ;P

https://sdcc.sourceforge.net/

That's the nice thing with C: it's much easier for small teams to fully support than the latest C++ standards.

replies(1): >>41859229 #
2. pjmlp ◴[] No.41859229[source]
Now try to use it on the embedded deployments that require certification.