6 ms·
"[C++] certainly has its good points. But by and large I think it's a bad language. It does a lot of things half well and it’s just a garbage heap of ideas that
by Jedd 5y ago
"[C++] certainly has its good points. But by and large I think it's a bad language. It does a lot of things half well and it’s just a garbage heap of ideas that are mutually exclusive. Everybody I know, whether it’s personal or corporate, selects a subset and these subsets are different. So it’s not a good language to transport an algorithm—to say, "I wrote it; here, take it." It’s way too big, way too complex. And it’s obviously built by a committee.
"Stroustrup campaigned for years and years and years, way beyond any sort of technical contributions he made to the language, to get it adopted and used. And he sort of ran all the standards committees with a whip and a chair. And he said "no" to no one. He put every feature in that language that ever existed. It wasn't cleanly designed—it was just the union of everything that came along. And I think it suffered drastically from that."
-- Ken Thompson, 2009
Source: https://en.wikiquote.org/wiki/Ken_Thompson#%22Coders_At_Work%22,_2009 https://en.wikiquote.org/wiki/Ken_Thompson#%22Coders_At_Work...
- pjmlp 5y agoBjarne's vision for C++ is well documented in "The Design and Evolution of C++". but naturally Ken Thompson is completely unbiased against C++, just like Linus Torvalds. https://www.amazon.de/-/en/Bjarne-Stroustrup/dp/0201543303 https://www.amazon.de/-/en/Bjarne-Stroustrup/dp/0201543303
- hdjjhhvvhga 5y agoRather than resorting to ad hominem, could you point out where exactly Thompson was actually wrong? Moreover, the criticism by Thompson and Torvalds refers to the use of C++ as a systems programming language. The language proved itself very efficient for application programming, including the browsers everybody is using.
- pjmlp 5y agoKen Thomson had no issues doing that when referring to Bjarne Stroustroup. He is completely wrong, because his comments reveals a complete lack of understanding how ISO works, or worse, he does understand it and is doing a malicious comment to transmit his biased opinion. Bjarne has the vote of one person, it doesn't matter how much he yells, screams, slashes the whip down the members back. It is one single vote, and above all, unless he has some dark magic powers, he cannot multiply himself to attend all voting sessions.
- cma 5y ago>it was just the union of everything that came along Garbage collection isn't in the language though some people wanted it. So it isn't a union of everything.
- emsy 5y agoNot in the mark-and-sweep variant but certainly as ref-counting. And not only once!
- pjmlp 5y agoActually it is, as API introduced in C++11, and yes Bjarne was one of those that opposed to it, if I remember correctly. However, since no one has made any use of it, and existing C++ GC's follow other schemes (Unreal, C++/ClI,...), there is a ISO C++23 proposal to remove it from the standard.
- account42 5y agoIt is not just Bjarne that opposed GC - no compiler implemented it (or not a major one anyway).
- rramadass 5y agoPeople really need to stop pointing this out (it was sort of off the cuff said during an interview). Ken Thompson and Bjarne Stroustrup have some history just like Linus Torvalds and Andrew Tanenbaum did. All of them are giants and while there are some merits to aspects of their arguments, it is a logical fallacy to use them as "Appeal to Authority" which is just an excuse for lack of knowledge/thought.
- eps 5y agoI've never seen this quote before, but I've been using C++ as my main language since the early 90s and this matches my opinion of it EXACTLY. C++ is a design-by-committee mish-mash language chokeful of everything that was ever thrown at it without any regard to how well it all fits together. In practice it is indeed used in a form of restricted feature subsets, because there's basically no other way to use it. It gets the job done, but it's an ugly bloated monstrosity. Not bad, just ugly.
- rramadass 5y agoThe book Concepts, Techniques and Models of Computer Programming talks about designing a Multi-Paradigm (i.e. different Computation Models) language named Mozart/Oz where the different Concepts/Features are somewhat orthogonal to each other but still exist within a overall comprehensive system. You use what best fits the Problem Domain. Unfortunately Mozart/Oz has not taken off in the Industry but C++ has fulfilled the niche though not as cleanly as envisioned in that book. Paradoxically, the breadth of the language features has become its strength. You can do Imperative/Object-Oriented/Generic/Functional/Concurrent programming all within the same language and using the same toolchains. Moreover, all these higher-level concepts do not prevent you from getting close to the metal if needed. AFAIK, no other "industrial" language even comes close. Alexander Stepanov, the inventor of STL is on record stating that he could realize his vision of a comprehensive, generic, flexible, efficient Algorithms library only in C++ (his attempts using Ada and Scheme both failed). That should tell you something about the power of the language.
- Jedd 5y agoRecent sibling comment has added to the overwhelming tone of HN comments on TFA - that C++ is a poor language. Has Ken Thompson ever retracted those comments? I can't find anything to suggest he had a different assessment. The phrasing used in that interview / book sounds like this is a subject he has deeply considered and well-reasoned - certainly not an off-the-cuff 'C++ is awful'. Ken and Bjarne may have some history, as you say - I do not know - but suggesting that implicitly reduces the legitimacy of his assessment may presuppose an inability to maintain impartiality on technical merits. I note that in the comments I quoted, and in other comments he's made about C++, his arguments are foremost about the quality and features of the language, with some hints about why it got to be the way. Whether it's an appeal to authority, or a deference to someone with unarguable expertise, is perhaps a subtle distinction.
- FpUser 5y agoI am a practical man and language for me is just a tool. I do not dwell on C++ being too complex (which it is when you take it as a whole). All I care is - does it have enough features that I can be effective in creating application. C++ definitely fits the criteria for me. I've heard horror stories where each member of a team uses it's own subset but practically for many years of dealing with C++ I do not feel I ever had problems when I had to work with other programmers. Programming general use libraries - sure. It is often enough hard to read black magic but I'll let people that are actually doing it worry about the problem. It does not have to propagate to application level programming.
- CodeGlitch 5y ago> I've heard horror stories where each member of a team uses it's own subset but practically for many years of dealing with C++ I do not feel I ever had problems when I had to work with other programmers. I feel the technical lead should be catching these problems during code reviews, and establishing best practices, etc. Also this problem exists in other languages, perhaps elevated slightly in C++, but until rust came along it was 1 of 2 choices you had for certain problems (C being the other obvs.). Speaking of rust I thing the jury is still out on whether it can catch up with C++ in terms of popularity.