DEV Community

Discussion on: C++ is awesome, here's why...

Collapse
 
afaliagas profile image
Apostol Faliagas

Mr Almond, you said that C++ is unsafe but you didn't give any clues. Then you said Rust is better (did you mean safer?) but you didn't mention in which sense. And you didn't give any clues again. Then you said C++ isn't faster, but you didn't mention any benchmarks. I stopped reading further because from what I read I conclude you are biased and opinionated against C++.

Collapse
 
codenameone profile image
Shai Almog

These are common terms and easily checked. I suggest reading this: en.wikipedia.org/wiki/Rust_(progra...

You can also do a slight bit of self research to learn about these things on your own e.g. this article is a bit out of date (and has problematic choices) but shows off some of the complexities of decreeing C++ as faster: en.wikipedia.org/wiki/Java_perform...

I've been a C++ developer since the early 90s. Hell yes, I'm biased against C++. I've also built JVMs (mostly in C but also in C++) so I'm pretty familiar with the performance nuances and benchmarks. Feel free to disregard my experience and go back to your bubble.

Collapse
 
deadstack profile image
Gavin Williams

The safety issues of C++ are well known; it's why we have safety features in newer languages. Microsoft and many others have talked about the problems of large C++ code bases and the growing bug count. The chair of the C++ committee is aware of the safety issues (see herbsutter.com/2024/03/11/safety-i...). It's not even a contentious point, and it isn't biased or opinionated, it's reality. C++ has some nice features, but safety is not one of them. I agree though that C++ is one of the fastest languages - I mean, isn't that the point. I love C# and, but I'm never going to say that C# is faster than C++. But it's close enough that it's the preferred language now for application development on Windows and expressive enough that it's the preferred language even for games on that platform - which is kind of incredible. C++ has problems, and we should be OK with identifying and talking about them because that will inform us as we develop the newer system languages like Odin and Jai and others. Denying that C++ has issues will just remove you from the discussion. Because there's a better conversation to be had over defending C++.