3 ms·
First comment on the article's own page pretty much nails it. C++ is flexible enough to be used as beefed up C - templates instead of macros, abstract classes a
by huhtenberg 19y ago
First comment on the article's own page pretty much nails it. C++ is flexible enough to be used as beefed up C - templates instead of macros, abstract classes and 'this' instead of callbacks and their arguments, operator overloading to produce more compact the code, etc. Noone is forced to use multiple inheritance, virtual base classes, template specialization and other ++ wonders.
The guy also claims that "every single aspect of C++ being designed around higher performance instead of my productivity". This is false. The fact that it allows writing high-performance code does not mean it was one of the primary design goals. It simply was not, this aspect of the language was inherited from C .. which is one of the languages the author declares to be "going back" to. Kind of ironic if you think about it.
http://www.dmk.com/c++/stroustrup_1986_10.html http://www.dmk.com/c++/stroustrup_1986_10.html
- scott_s 19y agoErr, if you read Stroustrup's Design & Evolution of C++, performance clearly was one of the primary design goals. Goals 2 and 3 in the statement you linked to spell that out. If a feature could not be implemented without effecting the efficiency of programs that did not use it, the feature was rejected. One of the points that Stroustrup stresses in D&E is that he wanted no languages below C++. There are many features that do have a runtime or space cost, but you only pay for it if you use it. And I think that in many cases, what you end up implementing yourself would pay the same performance costs, if not more.
- huhtenberg 19y agoYou didn't quite follow what I said or I phrased it badly. C++ performance requirements are inherited from "be like C" requirement. So when the guy says that he's going back to C, because C++ is "all about performance and not usability", it just does not make any sense.
- scott_s 19y agoSorry, I understand what you meant now.