but what it does not have is: simplicity, consistency, elegance, portability |
Sadly, I have to grudingly agree.
Simplicity
C++ started out as C with Classes. It provided direct support for abstract datatypes with guaranteed construction/destruction of classes. Then came support for objects, the original aim. So far, so good.
Now it starts getting complicated.
Multiple inheritance was added early because it was said it couldn't be done efficiently; well it was implemented efficiently in C++. But what a thing! I think the industry believes the best use of multiple inheritance (of implementation) is to avoid it.
ADA Generics were added with a C twist in the form of templates. It's turned out that templates are a language in themselves. The obvious case of vector<int> or min<int>() is simple enough, but templates can get really powerful, complicated and neigh impenetrable to the uninitiated in their own right (see Loki).
And of course, there's exceptions. This wonderful feature (along with RTTI) is a feature that has a runtime cost (shock/horror!). And as beautiful as it is to use, even with it contrained to the termination model, it's rarely used well. So why bother?
Add all that together, and you've got a hugely complicated language. I'm sure the author never expected it to be this complicated, all those boundary conditions and tweaks in a drive to make it consistent. Ugh!
Compared to C or Objective-C or even Java, C++ is an incredibly complicated language. It takes a long time to become an expert and it's an engineering feat of staggering achievement to produce a compliant compiler.
elegance
C++ can be elegant, should be elegant, but most commercial code I've seen isn't. It may be the effort in refactoring designs and then having that ripple thru C++ implementions, or the difficulty in finding engineers who can maintain a standard within a subculture, but much commercial code tends to build entropy quickly.
portabilityThis is my biggest issue with C++ and to C99 too. Why does the language need to keep evolving? After 18 or so years of C++ compilers finally converging on the standard, the standard ups and takes a few more steps into the unimplemented. Why oh why? Can we just let it be? These extensions seem to be improvements where properly used, but maybe they should just have gone into a new language, call it C2 or something. The extension of C++ into the latest standard just destabilises the C++ environment, puts portability at risk (because it'll take years for vendors to catch up on all the relevant platforms), subjects us to years of non-compilant and buggy compilers.
Has someone forgotten that C++ is an engineering tool? At least you know where you are with C (pre C99).