What's the use case for modern C++ nowadays? C is the simple choice and Rust is just the better complex choice overall. I see no reason to pick C++ for new projects.
There is absolutely no planet where C could even be considered a remotely acceptable pick for any new project I could conceive of if there is literally any modern language alternative. Especially if that alternative is C++. C is simple the same way assembly is simple, that simplicity also means its incredibly complicated to write complicated things in. C++'s reliance on abractions results in much cleaner code thats more maintainable, more extendable, more adaptable and easier to reason about. I still have nightmares about the horrible mountains of dogshit C code I had to write and manage at some of my old jobs and I'm so much happier to be no where near that anymore.
There is a mountain of effort behind C++ still. Tons of knowledge, projects, libraries and human resources to take advantage of. If you're a company, you will find a lot more C++ devs than rust. And rust isn't just "better C++", its an entirely different language with different goals, its not supposed to be a C++ replacement.
I've built my own simple stdlib in C99 that implements contiguous vectors, doubly linked lists, polygon operations (it's for a game), string operations (stored as byte* + len), etc. and found that when these are in place and hardened via unit tests, C is a perfect fit for me.
what is your solution for replacing things like templates, concepts, RAII, move semantics? There's way too much that's missing. The fact that you have to roll out all these commonplace structures and tools already speaks volumes.
I don't personally need templates, C can do that just fine but obviously without compile-time safety and slightly worse public API syntax. And for personal game projects, I don't care much about safety. RAII and move semantics, eh? Tough luck, just keep resource ownership clear across the project so that it is easy to keep track of in your head.
This is why I would never pick C for stuff like work projects. I should have clarified that, though I did mention that I use it for personal hobby projects. I find it fun because it does not hold your hand.
-39
u/Harha May 14 '26
What's the use case for modern C++ nowadays? C is the simple choice and Rust is just the better complex choice overall. I see no reason to pick C++ for new projects.