Comment by throwaway2037
Comment by throwaway2037 6 months ago
I agree: This quote is the star of the show. I'll troll a little bit here: I thought to myself: "Finally, a humble C++ programmer. Really, they do exist... well, at least one."
Comment by throwaway2037 6 months ago
I agree: This quote is the star of the show. I'll troll a little bit here: I thought to myself: "Finally, a humble C++ programmer. Really, they do exist... well, at least one."
Bjarne has his moments - I like his saying that somewhere buried underneath all of C++'s complexity there's an elegant language struggling to get out, and I'm sympathetic to his frustrations and believe he does have good intentions there.
But he can also contradict himself sometimes in this regard, because he also often uses a variation of calling C++ a language for "people who know what they are doing" as a sort of catch-all dismissal of critiques of its footguns.
The whole problem is that very few people can claim to truly "know what they are doing" when it comes to all of C++' features and how they interconnect, dismissing that by (implicitly) telling people to just "git gud" is missing the point a bit.
But again, he's only human and I do get the urge to get a bit defensive of your baby.
He also seems completely uninterested in finding that, "elegant language struggling to get out." He just asserts that it's there, as if its mere existence is a virtue.
I think Herb Sutter is at least trying to find that elegant language, with his "syntax v2" project. It's one way to preserve compatibility with the incalculable amount of C++ in the wild, while also providing a simplified syntax with better defaults and fewer foot-guns.
Of course, Herb isn't immune to making hand-wavy claims[0] of his own, but he seems to bring forward more good ideas than bad.
[0] https://herbsutter.com/2025/03/30/crate-training-tiamat-un-c...
There’s another slogan that also acts as catch-all dismissal - “easy things should be easy; hard things should be possible”. Yes, but the bar for “hard things” just happens to be frustratingly low compared to other languages - ie library programming that has enough genericity and robustness. To wit, this example.
> easy things should be easy; hard things should be possible
From many years ago, this was a Perl motto from Larry Warry. Is the original pontificator... or was it someone before him? > elegant language
Are there any languages that would qualify and are in common use in industry? I'm not interested in some PL fantasy language that no one outside of academia uses. JavaScript, Python, Ruby, PHP (see double-ended hammer!), C, C++, C#, Java, Go, Rust all have numerous warts, but are heavily used in industry. None of them are particularly elegant in 2025. In the modern era, it is impossible to separate the language itself from the standard library. Even if the language is elegant, I am sure the standard library will have all kinds of awful warts (probably date/time) -- or vice versa.Ok so there's a couple of leaps in this argument. All languages having "warts" is not equivalent to all languages "not being elegant", for one.
The other is that not all "language warts" are equal. Few would claim the severity of the footguns are equally bad among the languages you listed.
More importantly, I think Bjarne's comment was more about C++ being hindered by its commitment to backwards compatibility and mistakes in previous design decisions getting in the way of making new designs elegant to implement. Unless you come up with a completely new syntax (Herb Sutter's cpp2) or a way to locally break backwards compatibility (Sean Baxter's Circle) C++ has forced itself into a corner.
There's two:
> Even I can’t answer every question about C++ without reference to supporting material (e.g. my own books, online documentation, or the standard). I’m sure that if I tried to keep all of that information in my head, I’d become a worse programmer.
-- Bjarne Stroustrup, creator of C++