HACKER Q&A
📣 siamese_puff

Starting C++ in 2024, what to know?


Before I get too deep, I know a bit of Rust. It’s a nice language with a nice ecosystem. My interests are around learning C++ to create fun things as a hobby. What are some things I should definitely learn and use in 2024 w.r.t C++?

I haven’t used C++ since university 7 or so years ago, but I’ve done a tiny bit of C.

My reasoning is my work uses a ton of C++, a lot of legacy things I’m interested in reading and understanding are written in C++ and because I want to.

Open to recommendations around books, tooling and resources.


  👤 npalli Accepted Answer ✓
First thing to remember is C++ is very much a "live" language going through enhancements and the majority of the hardcore engineering still happens in C++ (real-time, AI, Machine Learning, High Performance Computing, CUDA etc..). There is a lot of advocacy by Rust devotees who somehow think C++ is "legacy" or whatever. Not true at all.

With that, look at Stroustup's latest book, it's a good introduction to programming using C++ --- Programming: Principles and Practice Using C++ 3rd Edition. Takes you all the way to C++23 from the creator of the language.

C++ Crash Course: A Fast-Paced Introduction by Josh Lospinoso is a very fun book and will give you a through grounding in working with C++ in a professional setting. However, it stops at C++17 and while the second edition is in the works, the first edition will take you far.


👤 hilux
You mention "legacy" C++.

Just so you know, I'm told that modern-day C++ is completely different, looks like a different language than Stroustrup's creation.


👤 MountainMan1312
I think C++ should only be used for maintaining legacy code. I don't think anything new should be made in C++ if it's meant to be used and not just a learning project. C++ is a Rube Goldberg machine. Too many good languages exist to keep inflicting C++ on the world.