News for hackers. Stuff that matters.
Re:C23: A Slightly Better C by z_open on Sunday January 21, 2024 @02:57PM (#39082359)
C++ and C are no longer used for the same types of projects so C++ is not a better C.
Re:C23: A Slightly Better C by mgaunard on Sunday January 21, 2024 @03:11PM (#39082520)
I think you must be from the 90s -- if so can you share your time machine?

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.

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?

Re:C23: A Slightly Better C by mgaunard on Sunday January 21, 2024 @03:20PM (#39082623)
Re:C23: A Slightly Better C by kleiba on Sunday January 21, 2024 @03:31PM (#39082724)
I wonder if Linus has changed his views on C++ too in the mean time.

http://harmful.cat-v.org/software/c++/linus

Re:C23: A Slightly Better C by franzb on Sunday January 21, 2024 @03:22PM (#39082645)
Re:C23: A Slightly Better C by rzzzt on Sunday January 21, 2024 @03:19PM (#39082617)
A weird way to spell "Rust".
Re:C23: A Slightly Better C by mgaunard on Sunday January 21, 2024 @03:21PM (#39082631)
I giggled -- thank you.
Re:C23: A Slightly Better C by liquid153 on Sunday January 21, 2024 @03:17PM (#39082587)
No they’re not
Re:C23: A Slightly Better C by riku_iki on Sunday January 21, 2024 @03:32PM (#39082738)
> 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.

Re:C23: A Slightly Better C by mgaunard on Sunday January 21, 2024 @04:35PM (#39083311)
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.
Re:C23: A Slightly Better C by riku_iki on Sunday January 21, 2024 @04:38PM (#39083340)
software is complex, and you can't be sure until you run it in mission critical production.
Re:C23: A Slightly Better C by mgaunard on Monday January 22, 2024 @03:07AM (#39087399)
With the same argument you couldn't upgrade the compiler at all.

Thankfully the Linux kernel development relies on testing instead.

Re:C23: A Slightly Better C by EasyMark on Sunday January 21, 2024 @08:45PM (#39085094)
I have my doubts on c++ ever making it into the mainstream kernel while Torvalds is benevolent dictator. Especially since there is rust. I agree with the rest of what you said though.
Re:C23: A Slightly Better C by pjmlp on Sunday January 21, 2024 @03:02PM (#39082415)
Until C fixes its string and array story, C++ keeps being a better C.
Re:C23: A Slightly Better C by cyberpunk on Sunday January 21, 2024 @04:12PM (#39083119)
I just use bstrlib... It's solid and works perfectly..
Re:C23: A Slightly Better C by pjmlp on Sunday January 21, 2024 @04:51PM (#39083445)
It is not part of ISO C and that is a big difference.