DEV Community

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

Collapse
 
metacoding profile image
Meta Coding

I used C++ around 30 years ago for 3-4 years while I was working on my startup project. At that time I was in love with C++. For me the most dangerous and annoying problem of C++ is having features like multiple inheritance that let developers create a very complicated non-managable code. Even though these features are superpowers of C++ but still are not necessary. Also in my opinion C++ syntax is ugly, old and complicated. In my opinion, a programming language should have the following charactristics:
1- Push developers to use best practices more and more
2- Have a tendency to simple readable code (anyway these languages are created because our brain cannot simply read the assembly language or binary codes)
3- Generate fast, reliable, predictable and safe code.

To my understanding, programming languages are now having a much more sensitive role than what they had two or three decades before. They are controling our homes, cars, sensitive medical devices and even our homeland security. Neglecting of the above features is far beyond the purpose of having a good software creation tool. That is why I think we should stop using C++ in our embedded vital devices, and instead use Rust or other alternatives. C++ still can serve in many areas such as game industry.

Collapse
 
vnjogani profile image
Vinit Jogani

I feel like what points (1) and (2) come down to is how opinionated a language is. Python and Go, for example, really care for "one right way to do something" which automatically produces code that follows best practices and are readable. C++ isn't really designed to be opinionated, and that has its advantages and disadvantages, but large codebases typically define their own guides and enforce them automatically to achieve that. It may not be the best solution for all teams and developers though, I agree.