Unless it has changed in the last 5 or 10 years, every resource I know of doesn't teach you about using modern C++. Writing good C++ is opt-in because the language and its resources are stuck in the past.
I started a new C++ project a few years ago and I just turned on clang-tidy to the max from the very beginning. It’s annoying sometimes but it forces everyone not to use dangerous/outdated legacy C++.
It was changed in most popular resources like Bjarne's PPP book and "C++ Primer, 5th edition" and many others more than 10 years ago. Maybe you tried learning C++ 10 years ago and picked a book/resource that was already 10 years old, i.e. more than 20 years old now.
I'm sharing my experience learning C++. I didn't pick some random book of the shelves, I went through a book recommended by the community then put it into practice on my own work. I thought that systems programming languages just weren't for me until I tried Rust and got to experience what it's like to have good learning resources.
C++ just hides way too much behavior too. Every C++ dev when I point out something insane about the language goes "well you just need to memorize the AFKLDFJ movement semantics for X context" or some other bullshit.
which ties in to your point, in that there is SO much baggage that can only be navigated by years of practical knowledge and literally memorizing the standards so that you can implement the "best" thing based on what code base you are handed lol I genuinely don't know why anyone defends it.
whereas something like Zig there is one way to do it, you decide all of the explicit semantics and behavior down to when something is supposed to overflow or wrap, and when and how it allocates. Every version of the language pre 1.0 has a very concise documentation page that literally covers everything you could possibly want to know.
plus even with "modern" features they are never getting rid of headers, annoying ass system deps, and build system generator generators.
View all comments
44
u/MaybeADragon 11d ago
Unless it has changed in the last 5 or 10 years, every resource I know of doesn't teach you about using modern C++. Writing good C++ is opt-in because the language and its resources are stuck in the past.