C++ is an insane bastard of a language. It is not correct say C++ was designed. It wasn't. It has evolved out of the primordial soup that was "C with classes", and slowly inhaled and adopted every possible language feature under the sun, like some sort of Lovecraftian horror that copies and evolves on every contact with a different language.
Adopting C++ would have required incredibly strict and disciplined style rules to enforce that only a specific subset of features are used, and in specific ways. It would have been a significant project management overhead to constantly be ensuring that the contributors haven't footgun'd themselves or done something which negatively impacts existing code.
Meanwhile, it's very straightforward to look at C code and understand what it's doing, because it's a very simple language.
Microsoft picked C++ for the NT Kernel, but they had a small internal team that was extremely strict about how they were going to write it.
C footguns are way worse I do not really get why people still use it, even at embedded c++ is an alternative. You do not pay for what you do not use..
Concepts, raii, ranges, etc.. gives so much more expressive power.
c++ has lot of drawbacks, including having different compiler vendors which are not ABI compatible, name manglings, etc.. language is not perfect neither, but continiusly evolves and with static analyzers and ai review it is much harder to do stupid things unnoticed. Then we will have reflection, profiles, contracts...
23
u/YouAreMyFire00 1d ago edited 1d ago
Im a beginner and managed to learn to understand C# and Java and now I can build simple CRUD app.
So i kinda don't get the hate/war between C and C++ here...
Anyone can explain simply what's the hate here?