3 ms·
I've never really liked that quote. It's just a way of saying that nothing's perfect, and of course nothing is perfect, but that doesn't mean you shouldn't try
by agalunar 3y ago
I've never really liked that quote. It's just a way of saying that nothing's perfect, and of course nothing is perfect, but that doesn't mean you shouldn't try to improve them. The quote has always struck me as defensive in a way that stops discussion. It's okay (in fact, more than okay) to say that a complaint is founded on an unsound premise or that a proposed change is a bad idea, but calling other languages useless or unwanted (or implying something to that effect) in response to criticisms of C++ is a bit of deflection, as if saying "well, at least people are productive in it", and I don't think particularly constructive. I think you can start a constructive comment this way, though: "despite its problems, people are still productive in C++ and I think x, y and z are reasons why, so x, y, and z ought to be kept, &c". And in some other context, I think this observation is meaningful: all the languages that are commonly used are complained about, so a complaint about C++ does not necessarily imply that it's worse than any other commonly used language.
- agalunar 3y agoah, to be clear, I'm not saying I disliked the parent comment by rr808! I was just tangentially ruminating on the quotation.
- tialaramex 3y agoYeah, it maybe works as a snappy comeback but there is no deeper insight here. Is it possible to make a language that more people use and yet there are fewer complaints? Of course.
- deterministic 3y ago> but that doesn't mean you shouldn't try to improve them Nobody suggests you shouldn’t. Stroustrup has spent most of his career working on improving C++. You are reading way more into his comment than I think was intended or implied. C++ is one of the most successful programming languages in history. There is a reason why.
- agalunar 3y ago> You are reading way more into his comment than I think was intended or implied. You're likely correct (I'm unable to find the original context of the comment), but it's rarely employed with its original context. Indeed, I was more trying to say that I disliked the quotation itself (and how it can be used) than whatever Stroustrup meant by it. > C++ is one of the most successful programming languages in history. There is a reason why. And I said as much in my comment. (I would also point out that some of the reasons may not be good reasons. But some certainly are!) > Stroustrup has spent much of his career working to improve C++. To improve the current situation, we may want to abandon C++ altogether for new programs rather than stubbornly hold on to it. (In the back of my mind is Stroustrup's recent reaction to the NSA report on memory safety.) I'm under no illusion that programmers will begin formally proving properties of their programs, as interested as I am in that. But people seem to rarely avail themselves of the tools that help them write correct C++, and rarely manage to use only modern C++, which suggests we may want to simply let go of it. Or radically change it – making safety features opt-out rather than opt-in.
- deterministic 3y agoI routinely deploy very large C++ applications used by international airlines around the world. And I haven't had a single bug in production for 5+ years. Not even one. The secret is 9000+ auto tests pushing the code way beyond real world usage. Changing from C++ to another language won't change the fact that those tests are needed. Memory leaks and multi-threading issues are simply non-issues for me. I use tools like Helgrind and Valgrind to find and fix those. In other words, new languages like Rust doesn't solve any problems I have. There is no silver bullet.
- agalunar 3y agoThat's very impressive! I desperately wish more people did their production work like you do. I genuinely can believe that Rust, Carbon, &c wouldn't make much of a difference for you. But for others who don't exercise the same discipline (for whatever reason, internal or external) I think they can. I agree there are no silver bullets; that's why each little bit helps. edit: I think our software woes have mostly to do with human nature; solutions (if they exist) will primarily be educational and social, not technical. But universal computers are less than a century old, and we can certainly do better on both fronts. If we've learned something about the way most people write programs and interact with existing tools, we perhaps ought to make of use of that experience to design better languages and tools.