Re:C23: A Slightly Better C
by leosanchez on Sunday January 21, 2024 @03:15PM
(#39082563)
> Even the Linux kernel is considering switching to C++ now.
Source?
I wonder if Linus has changed his views on C++ too in the mean time.
A weird way to spell "Rust".
I giggled -- thank you.
No they’re not
> Even the Linux kernel is considering switching to C++ now.
considering doesn't mean it will happen in near future, because toolchains/ecosystem is not there, the same is applicable for many other projects.
I'm not aware of any toolchain limitations; making the kernel compile as C++ is doable with a few trivial patches, and the kernel already is heavily GCC-specific, which supports both C and C++ to the same level.
software is complex, and you can't be sure until you run it in mission critical production.
With the same argument you couldn't upgrade the compiler at all.
Thankfully the Linux kernel development relies on testing instead.
All kinds of major projects switched to C++ already, for example GCC. All the major new projects, for example LLVM, are also in C++ from the get-go.
Even the Linux kernel is considering switching to C++ now.