Live data from Hacker News

C++: The Documentary

herbsutter.com

71–80 of 334 posts

Re: C++: The Documentary

#71
post #11

It's surprising that C++'s development trend continues. When a game or program is made with C++, it's usually nice because performance is mostly guaranteed. But if someone told me to write C++ myself, I'd cry. There's too much to memorize, and the standards are too varied. When I go to a project site for maintenance and it's a C++ project, I instantly lose energy — because it's just too difficult. I'd be happy if som…

Personally I don't find programming with C++ that hard. The downside is it needs a brain warm-up, and this is per project, but once that flywheel is spinning, I find it almost effortless to write code. I have to go through the same warm-up more or less for any language I work with, so it's not that different than writing Python, Go or Java for me.

I find C++ not hard at all when working with familiar idioms, restrictions and toolings (familiar to me). But it's hard jumping into new codebases and adjusting yourself to new patterns. Recently I did a lot of programming using C++23 Modules and it was a breeze.

There's basically dozens of very nice languages inside C++. That can be a blessing or a curse.

I'm anxious for Herb Sutter's CPP2/CPPFront to become a standard.

Re: C++: The Documentary

#72
post #11

It's surprising that C++'s development trend continues. When a game or program is made with C++, it's usually nice because performance is mostly guaranteed. But if someone told me to write C++ myself, I'd cry. There's too much to memorize, and the standards are too varied. When I go to a project site for maintenance and it's a C++ project, I instantly lose energy — because it's just too difficult. I'd be happy if som…

Not really, despite all its warts, it is exactly because of them that many reach out to C++.

Many of us don't like C, it was already too little and too unsafe, when the first C++ compilers started to hit the market in early 1990's, hence why all desktop OSes moved into C++ for their frameworks.

The return to C has caused by the rise of FOSS, UNIX winning the server room, and early GNU coding standards to use only C as main compiled language.

Additionally as many other programming language ecosystems have discovered, it is easy to beat C++ in version 1.0, and eventually all of them grow to get the complexity of their own.

I reach for C++, because the language runtimes, compiler tooling, and GPGPU frameworks I care about are partially written in C++, and I am not in the place to be writing new ecosystems myself.

Re: C++: The Documentary

#73

Earlier quoted context omitted.

The language is fine, mostly, nowadays. The ecosystem isn't fine - just to get a project going requires picking a non-trivial set of tools and approaches, none of which the C++ standard enforces or guides to. For example, will you manage dependencies via packages? If so, with what? What will you use for building your project? The list goes on and on.

No it's not. The language keeps growing, with - new features overlapping old features from previous standards without replacing them or deprecating them (function::copyable_function vs std::function, std::less key for transparent lookup in maps) - new features not usable by the layman (coroutines ...) - Cryptic syntax (reflection...) - Stuff you are told not to use because of performance reason and that cant be fixed…

I wonder how many programming languages would be able to devoid of all or some of these problems when they are 40 years old.

It's easy to compare new and old languages, and saying older languages are wrinkly. Let's see how other shiny programming languages look like when they are 40 years old.

Re: C++: The Documentary

#74
post #31

Earlier quoted context omitted.

If you don't use the STL you end up re-implementing it yourself. Usually poorly.

> Usually poorly. On the contrary. You can focus exactly on the features the higher level game code needs. The C++ stdlib is (for the most part) poorly designed, usually poorly implemented, the main reason for slow build times, and its complexity explodes because it needs to consider all edge cases that most code bases don't ever trigger. A specialized dynamic array class in a few hundred lines (at most!) and with ju…

Which is why one of the security measures in C++26 is to make bounds checking idiomatic, finally.

Re: C++: The Documentary

#75
What a lineup of contributors—Stroustrup, Stepanov, Kernighan, Lattner, and more in one film. Forty years from 'C with Classes' to the fastest-growing of the top four languages is a remarkable arc, and it's nice to see the people behind it get their due. Adding this to the weekend watchlist. Thanks for sharing, Herb!

Re: C++: The Documentary

#76
post #31

Earlier quoted context omitted.

If you don't use the STL you end up re-implementing it yourself. Usually poorly.

C+ Standard Template Library is the best designed part of C++ library. It was designed by Alexander Stepanov. https://en.wikipedia.org/wiki/Alexander_Stepanov

Nowadays also used by many of us (wrongly) to refer to the overall C++ standard library, instead of what was inherited from C.

Re: C++: The Documentary

#77
post #24
post #11

It's surprising that C++'s development trend continues. When a game or program is made with C++, it's usually nice because performance is mostly guaranteed. But if someone told me to write C++ myself, I'd cry. There's too much to memorize, and the standards are too varied. When I go to a project site for maintenance and it's a C++ project, I instantly lose energy — because it's just too difficult. I'd be happy if som…

You can be pretty productive even with 70% of the language :) It is a common misconception that C++ is suitable only for game engines and similar domains. It is perfectly fine for applications domain as well. As a side note, regarding your profile info, unless you are based in North Korea, please at least add one 0 to your rate. You'll get more long-term and high-quality clientele.

Only by people that started working in Web during the 2000's.

Back in the 90's, it was the main business language alongside Smalltalk, Delphi and VB.

Hence the plethora of C++ frameworks to chose from, sadly most dead since .NET and Java took over most of the use cases.

Re: C++: The Documentary

#78

Earlier quoted context omitted.

The language is fine, mostly, nowadays. The ecosystem isn't fine - just to get a project going requires picking a non-trivial set of tools and approaches, none of which the C++ standard enforces or guides to. For example, will you manage dependencies via packages? If so, with what? What will you use for building your project? The list goes on and on.

No it's not. The language keeps growing, with - new features overlapping old features from previous standards without replacing them or deprecating them (function::copyable_function vs std::function, std::less key for transparent lookup in maps) - new features not usable by the layman (coroutines ...) - Cryptic syntax (reflection...) - Stuff you are told not to use because of performance reason and that cant be fixed…

So a bit like Python or any other language of similar age.

Re: C++: The Documentary

#79
post #9
post #5

> currently (as of Q3 2025) the fastest-growing of the top four languages in the world… +90% users in the past 3.5 years. Because of AI, right?

but do vibe coders even use c++? won't they use js or python?

Reddit's r/cpp has always had some level of "My First X" posts where somebody goes from their first C++ lesson to being confident they've written the "World's Best X" in about a week. The AI slop made this much worse because now the author has been told by ChatGPT or whatever that they're a genius.

All the popular PLs have this problem to some extent.

Re: C++: The Documentary

#80
post #71

Earlier quoted context omitted.

Personally I don't find programming with C++ that hard. The downside is it needs a brain warm-up, and this is per project, but once that flywheel is spinning, I find it almost effortless to write code. I have to go through the same warm-up more or less for any language I work with, so it's not that different than writing Python, Go or Java for me.

I find C++ not hard at all when working with familiar idioms, restrictions and toolings (familiar to me). But it's hard jumping into new codebases and adjusting yourself to new patterns. Recently I did a lot of programming using C++23 Modules and it was a breeze. There's basically dozens of very nice languages inside C++. That can be a blessing or a curse. I'm anxious for Herb Sutter's CPP2/CPPFront to become a stand…

What type of project actually uses C++ 23 modules in real life? What kind of toolchain enables that? When I worked on Chromium, they were indefinitely in the "maybe in 5-10 years the tooling will be ready" camp.
Post reply on HN