Hacker News new | ask | show | jobs
by tiptup300 785 days ago
I've always wanted to learn C++. I have a great handle on C#, making large applications and architectures as well as legacy refactoring in C#, and I would love to learn C++.

I recently started at a company with a bit of a hairy c++ application that I would love to refactor or understand more thoroughly. Is this book a good place.

Note that I have read a very basic book on C++ much more learning programming book, but got me introduced to the memory management concepts.

As well I've been getting through Effective C++: 55 ways..., but this seems more like a tips and tricks and I don't think I'm getting much out of it.

4 comments

I personally recommend starting with Stroustrup’s other book…A Tour of C++. It really brings you up to speed quickly with what you need to know in the language without a lot of excess fluff. It’s also very up to date compared to other books.
I love that format, more languages should do it. One of the few pure language books I read cover to cover.
I agree!

Another approach I really like are interactive “notebook” style language tutorials. Swift Playgrounds is an excellent implementation of this.

Scott Meyers’ “Effective C++” series are digestible reads that cover the corner cases a modern C++ developer might hit, as well as guidelines and best practices to keep from shooting yourself in the foot.
Those are starting to be pretty out-of-date. Proper C++23 code looks nowhere like code from Effective Modern C++ (published in 2014) just like you wouldn't expect C# or JS books from 2014 to be up-to-date with 2024 good practices - compare for instance Eloquent Javascript 1st edition (2011) and 4th edition (2024) : `let`, `const`, `use strict;` and a ton of other things taken for granted today weren't there.
I haven't read this new edition, but the previous ones are pretty decent for the why's and hows.

If you want to work on your "hairy c++ application" you'll benefit from understanding how "modern c++" it is (and what your toolchain supports).

Meyer's effective books are good with two caveats: first, they are really meant to improve practice for people who are already working in the language (e.g. don't do it that way, and here's why). Second, the older ones are now dated and some advice need updating to work with newer language spec.

If 3rd edition of this one lives up to previous, it should be a pretty good read but as others have mentioned the "Tour of C++" book is a good entry.

I would be wary of older literature. They're often full of classic polymorphism, something that modern c++ has largely moved away from.