4 ms·
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 re
by pjmlp 2y ago
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.
- bilekas 2y ago> 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.
- pjmlp 2y agoI doubt Cranelift will ever match the only project that has beaten the contribution level of Linux kernel.
- cornstalks 2y ago> 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.
- pjmlp 2y agoThose 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.
- motorest 2y ago> 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-support-arriving-in-msvc/ https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-...
- pjmlp 2y agoBecause 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-and-c99/ 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.
- janice1999 2y agoI imagine most C programmers are still using C99 or older anyway, particularly in the embedded space.
- ericbarrett 2y agoI'm not sure this is still true. I'm just a hobbyist but esp-idf, for example, supports C++23.
- TJSomething 2y agoesp-idf is still on GCC 11, but most of the features of C23 are in GCC 13.
- phkahler 2y agoC99 or newer. You gotta have standard fixed size types like int16_t.
- bcrl 2y agoNot 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.
- uecker 2y agoWhat part of C23 makes you believe this?
- pjmlp 2y agoEverything 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.
- uecker 2y ago_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.