Defective C++

  • It’s funny because you really have to have a lot of experience with the language to articulate these issues. C++ is the worst language, besides all the other ones, when it comes down to performance and third party library availability.

    I’ll just throw in my own pet peeves here.

    The existence of .h files is still a big problem. I’m not aware of another language (besides c of course) that basically forces you to type the same letters twice in slightly different ways in order to expose a public api.

    I also don’t understand why there’s still no way to print an enum value.

    However there is some progress. I think std::span fixes the issue with the vector of const vs const vector. The Eigen library gives a (not perfect, but very convenient) matrix type. And I think I heard something about modules?

  • Should have (2009) in the title. I don't know enough about C++ to say which of the problems have been fixed since then.

  • Well the very first item in the list is wrong so I stopped reading there. Have your interface between systems be pure abstract virtual classes so that changing private members in a concrete subclass doesn't propagate the change to the consumers.