The C++ code I write these days is actually pretty similar to Rust: everything is explicit, lots of strong types, very simple and clear lifetimes (arenas, pools), non-owning handles instead of pointers. The only difference in practice is that the build systems are different and that the Rust compiler is more helpful (both in catching bugs and reporting errors). Neither a huge deal if you have a proper build and testing setup and when everybody on your team is pretty experienced.By the way, using "atoi" in a code snippet in 2025 and complaining that it is "not ideal" is, well, not ideal.
mountainriver|10 months ago
I tried again recently for a proxy I was writing thinking surely things have evolved at this point. Every single package manager couldn’t handle my very basic and very popular dependencies. I mean I tried every single one. This is completely insane to me.
Not to mention just figuring out how to build it after that which was a massive headache and an ongoing one.
Compared to Rust it’s just night and day.
Outside of embedded programming or some special use cases I have literally no idea why anyone would ever write C++. I’m convinced it’s a bunch of masochists
morsecodist|10 months ago
runevault|10 months ago
I am no expert so take it with a grain of salt, but that was how it felt for me.
almostgotcaught|10 months ago
Well there's your problem - no serious project uses one.
> I’m convinced it’s a bunch of masochists
People use cpp because it's a mature language with mature tooling and an enormous number of mature libraries. Same exact reason anyone uses any language for serious work.
ValtteriL|10 months ago
With Nix, the package selection is great and repackaging is fairly straight forward.
kanbankaren|10 months ago
Modern C++ has reduced a lot of typing through type inference, but otherwise the language is still strongly typed and essentially the same.
pjmlp|10 months ago
Meanwhile it was one of the reasons after Turbo Pascal, my next favourite programming language became C++.
For me mastering C, after 1992, only became mattered because as professional, that is something that occasionally I have to delve into so better know your tools even if the grip itself has sharp corners, otherwise everytime the option was constrained to either C or C++, I always pick C++.
simonask|10 months ago
It _is_ statically typed, though, so it falls in a weird category of loosely _and_ statically typed languages.
mathw|9 months ago
You CAN write nice modern code in C++, but the ability to force yourself and all your colleagues to do so in perpetuity isn't really there yet.
Although it might be in the future, which would be nice.
yodsanklai|10 months ago
Meaning you're in a context where you have control on the C++ code you get to write. In my company, lots of people get to update code without strict guidelines. As a result, the code is going to be complex. I'd rather have a simpler and more restrictive language and I'll always favor Rust projects to C++ ones.
bluGill|10 months ago
Of course it will probably not be as bad as C++, but still it will be complex and people will be looking for a simpler language.
andrepd|10 months ago
taylorallred|10 months ago
thrwyexecbrain|10 months ago