I’d argue that until C++11 C++ was /objectively/ a terrible language and the only reason people used it (and continue to use it) is because it’s nearly 40 years old and therefore ubiquitous. C++ is a language that is literally famous for being famous. I know I certainly wouldn’t be using it if I had any other viable (high performance) language with the same ecosystem, support and tooling. It’s not “battle tested” it’s just too big to fail, and therefore a lot of smart people have dedicated a lot of effort to developing tools and standards that make it just barely passable for enterprise use.
GuiA|6 years ago
> “[no other] viable high performance language with the same ecosystem, support and tooling”
This comment strikes me as deeply contradictory. I have qualms with C++ as any other C++ programmer, but saying it’s famous for being famous is just ridiculous.
C++ has been used to operate nuclear submarines, airplanes, pacemakers, financial systems, ... over the last few decades. I’d like to know what you consider “battle tested”.
sgt101|6 years ago
pjmlp|6 years ago
I belive that if Java and .NET actually had a proper AOT toolchain since day one, instead of being commercial only (Java's case) or doing basic optimizations (NGEN), there would be even less use cases for its use.
EDIT: typo
mathw|6 years ago
Modern C++ is much better, unfortunately there's stuff from the past they can't ditch without breaking compatibility so it really isn't much better - yes it's got better tools, but nothing's going to make you use them unless your compiler has some clever analysis features you can turn on and do things like make raw "new" an error.
mikekchar|6 years ago
For me modern C++ is interesting, but it has even more of the problems that Rust has. There are lots of good ideas that help fix problems we've seen over the last 40 years or so (man, I'm old...), but I think unless you are already a C++ programmer it's probably more convenient to start with a language that was designed from the beginning to solve those problems. If someone paid me, I'd very happily write C++ code again, though.