.
Linus certainly tends to exaggerate his points, and to express his
personal opinions as though they were indisputable facts. To a fair
extent he is justified in this - the topic was one of his two personal
projects, the "git" version control system. He wrote the software, at
least the initial version. He administers the project, and he gets to
choose the language(s) used for it. He was asked why /he/ did not
choose C++ for /his/ project - not for a blanket statement of opinion on
all uses of C++ in software development.
And I think there is at least some correlation between programmer
abilities and programming languages, and how "good" a programmer has to
be to be "good" in particular languages. It is very easy to write bad
C++ code - a lot of C++ programs start off trying to have a good
structure, and end up bogged down in layers of complication and
abstraction. I have seen such systems, with so many layers of factory
functions, delegating classes, wrappers, abstractions, etc., that it is
almost impossible to find code that actually /does/ something other than
pass responsibility on to another function or class.
Leaving Linus aside for a moment ...
I've seen that kind of code a lot. Full of those things you mention.
I don't think I mind any of the things you list, as long as they bring
some benefit to /this/ particular software project.
Design, to me, is supposed to /highlight/ the interesting parts of the
code. If it suffocates it, it has failed.
Assuming "abstraction overkill", the "fantasy castle effect" or
whatever we should call it is a bad thing:
(a) What does it say about the quality of the programmer?
(b) Are C++ programmers extra vulnerable to abstraction overkill?
(c) If so, why?
(d) If not, are most programmers so bad that they will start to
produce nonsense if you give them powerful enough tools?
Or will the worst ones give up if all they have is C?
(e) Do C++ projects attract high-level architecture people who mess
up the design and then leave, while C projects are run more
pragmatically because they're less attractive to predators?
I don't have the answers.
I don't think C makes it easier to be a /good/ programmer than C++ does
- but I think C++ makes it easier for a poor or mediocre programmer to
make a bigger mess than with C. And it is easier for a good C
programmer to help the mediocre C programmer improve his good than with C++.
I don't see why that would be, in a project. The things you describe
are on the architecture and design levels, and the mediocre programmers
probably aren't allowed to unilaterally decide that part, if there are
good ones around.
Also, decent C++ design isn't that hard to learn -- IMHO what you need
to know in 90% of the cases is summarized in one chapter of TC++PL.
Arrange your code as types, modeled after concepts in the problem domain.
Use type safety. Use RAII. Use the standard library. And so on.
A company could have a rule that if you thing you need 15 layers of
virtual inheritance, you need to discuss it with someone first.
No matter if "you'll mess up if you use C++" is true or just a popular
idea, it is a problem. To me personally, to software projects, and to
C++.
/Jorgen