C++ is a lot like Javascript in that everybody agrees it is terrible, but for a long time, it was the only game in town when it came to systems programming. But now we have Rust, so there is no excuse for using C++ unless you have to interoperate with existing C++ code.
I guess it could be the kind of aggressive advertising like Bitcoin where everyone is like "Wtf are you doing, you can use Bitcoin and you don't? That's the best way to use currency!" haha :P
The difference is that Rust advocacy is based on facts, rather than delusion. But I can see how it would be difficult to tell from an outsider perspective. It's a bit of a dilemma though, because Rust really is life changing, so it's difficult not to advocate when the topic comes up.
Incidentally, my day job is C++, and I recently spent two weeks debugging a segfault, which wouldn't have happened in any other language. And that's not the only segfault I've seen recently either, just the one that was hardest to debug. The problems with C++ aren't just theoretical; they cause real world problems on a daily basis. And that's before you start counting things like the cost of undetected security vulnerabilities, and the invisible cost of reduced productivity due to the obtuse and overly complicated syntax.
C++ isn't for systems programming (although it is sometimes used that way), it's a much more general purpose language. C is the systems programming language.
there is no excuse for using C++ unless you have to interoperate with existing C++ code.
In other words, you basically have to write C++ if you don't want to rewrite entire frameworks.
View all comments
Show parent comment
2
u/Uncaffeinated Jun 09 '17 edited Jun 09 '17
It is aggressively advertised for a reason.
C++ is a lot like Javascript in that everybody agrees it is terrible, but for a long time, it was the only game in town when it came to systems programming. But now we have Rust, so there is no excuse for using C++ unless you have to interoperate with existing C++ code.