Live data from Hacker News

C++: The Documentary

herbsutter.com

41–50 of 334 posts

Re: C++: The Documentary

#41
post #27
post #24

Earlier quoted context omitted.

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.

Honestly, I don't expect to find clients here. Fundamentally, you have to trust me to give me work. The amount of money doesn't really matter much to me.

I mean, the lower rates arouse suspicions. The higher you value your work, the more trustworthy you appear to clients.

Re: C++: The Documentary

#42
My only problem with C++ is that it’s too verbose. my eyes need to parse huuge chunks of things when I just want some convenient syntax for it. otherwise the idioms are pretty universal for most programming languages nowadays.

Re: C++: The Documentary

#43

Earlier quoted context omitted.

The article might be slop, but the problems described in it are definitely real ;)

Grossly exaggerated or misunderstood in many cases. Some of their arguments are just flat-out wrong. I mean, why are they blaming the standard library for inherent properties of linked lists? Yeah, you don't want to use them without good reason. That's just called picking the right data structure for the job, not a flaw with the standard library. Some of the other choices were tradeoffs between performance and usabil…

As I understood the article, the main critique is that the stdlib has no concept of deprecation and breaking backward compatibility. E.g. the C++ committee is quick to add badly designed features to the stdlib but then can't roll them back when people actually realize that those new features are useless for most real-world code.

Re: C++: The Documentary

#44
post #6
post #3

[flagged]

I have the utmost respect for Casey, but his disdain for Stroustrup is unfounded. The fact of the matter is C++ occupied a niche in the right place and at the right time, and it grew from there. Many mistakes have been made, but Stroustrup is in no way personally responsible for all of them and I don't think Stroustrup is a bad programmer (something I've heard Casey say in some of his videos). You can argue that the…

I agree. His negativity has probably detracted quite a few people from him that otherwise are quite aligned. Still, his historical remark is rather peculiar.

As for the language, yes, sadly, it’s with us seemingly to stay. I code it professionally and I can’t find a single interesting, or even good, thing about it. Apart from wide adoption of course. Everything about it feels extremely badly designed from the user perspective (though it’s probably technically very impressive) with many details, that probably the sanest strategy is to use a small subset of the language. At least I don’t have to use STL at work, that’s something positive, I guess :)

Re: C++: The Documentary

#45
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.

> 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.

How is that different from other languages, which don't need the brain warm-up?

Re: C++: The Documentary

#46
post #31

Earlier quoted context omitted.

For games, C++ becomes a much simpler language since game code bases usually ignore the C++ stdlib (at least mostly, and for good reasons, e.g. see [0]). And without the stdlib C++ is actually kinda-sorta okay-ish. Related, the main problem with the C++ ecosystem is that everybody carves out their own language subset, so it's not one ecosystem but many ecosystems with contradicting styles and language/stdlib subsets.…

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

Re: C++: The Documentary

#47
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…

Yes I don't disagree that sometimes a specific container or a data structure is great for the problem. Problem is that most of the game code and related code (so tooling,editor, auxiliary engine code) does need a typical STL type functionality and then when the org has "omg no STL" blanket rule someone ends up implementing STL and that's almost always worse than the STL that ships with the tool chain. Even worse..it'll be missing features and data structures and then people have to write sub-optimal code to work around it's limitations.

Re: C++: The Documentary

#48
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…

[deleted]

Re: C++: The Documentary

#49
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…

>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. If you'd already been using it for 10+ years you wouldn't feel that way, because you'd already have memorized a lot of it.

Except the language keeps growing, with

- new features overlapping old features previous standards without replacing them or deprecating them. - new features not usable by the layman - ...

See function::copyable_function vs std::function, modules, coroutines, Reflection syntax is cryptic at best, ...

Re: C++: The Documentary

#50
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…

funny, I think the same about rust.
Post reply on HN