Comment Re:Blame C++ (Score 1) 112
The question is, what language would they write good code in?
If Linus is right, C++ attracks bad programmers. So another language would not help. Personally, I stick to C. It is not the perfect language, but all others I tried are worse..
FWIW, C++ has many features that are strong improvements over C.
Well C++ has many features. They are meant to be improvements. But they are basically *all* broken.
Class encapsulation,
This is just syntactic sugar. But even this is broken: You have to put the complete class definition in the header - including private implementation details. How stupid is this? You can actually have much better encapsulation in C by putting an incomplete struct in the header and define the struct in the C file.
e.g. OTOH, it's also full of things that are only worthwhile if you are really interested in run-time optimization.
I am not sure what you mean by this... C++ is good if you want to do compile-time optimizations and you don't trust the compiler to do it for you, so you write your own program transformations using templates which run at compile time and generate super efficient code. Some interesting math libraries are written this way. But ofcourse, templates as a compile time language are just horrible and you would be much better off to write code generators in a proper programming language instead.