Ask HN: Best way to learn C++ in 2022

12 points by mr_o47 ↗ HN
Hello HN,

What are good books, tutorials and courses which can allow you to become better C++ programmer if you are starting as beginner

7 comments

[ 6.1 ms ] story [ 32.1 ms ] thread
If you are starting as a beginner then I recommend that you simple “Don’t”. C++ is a rather terrible and (slowly) dying language. I have to use it at work with Qt and would rather be coding in just about anything else (including Forth!)

If you want to learn low level coding, Rust is probably your best option.

If you want move up a level and don't need to be right against the metal, Crystal is probably the best OOP choice.

Beyond that, if you don’t need your code to be near C speeds (most applications do not), there are a number of good choices that will make you far more productive — Elixir, Ruby, Clojure, Pharo, Julia, etc.

yeah I use it at work too, as just about 99% of the people who work anywhere close to the metal or high performance, but you should definitely learn _that_new_language_2022_, because the thing that actually feeds us and has been staple of the industry for decades is just .. sooo .. terrible
If languages "dying" is a concern, several of your recommendations have barely been alive in the first place.
I agree that Rust is really good, and I plan learn it soon. But even if I agree that the language is dying, the majority of low level projects are still in C/C++, and will be for a loooong time. So to be effective in the close and even not so close future, and to understand the environment you are building over, knowing C++ is almost fundamental.

And also, it's important to learn C++ to understand what are the problems the new solutions solve, and how and when to use them in a more effective way.

The C++ Programming Language from Stroustrup is the c++ bible but Im not sure all of what you find there is actually useful for day to day coding.

To become a better C++ programmer you just use the language, but not on a project where you fix bugs, but on a project you write from start to finish. If this is not possible at work, you could try looking into contributing to open source c++ projects on github...

When using C++ in practice to build projects you realize what features are actually useful, what to avoid and what the limitations of the language are. C++ does have a lot of after thought add-ons...

I will copy my answer from a previous "Ask HN" that asked a similar question.

  > https://cppbyexample.com/
  >
  > https://hackingcpp.com/
  >
  > https://www.learncpp.com/
  >
  > https://github.com/AnthonyCalandra/modern-cpp-features
  >
  > https://cppinsights.io/ it's a must so you can investigate what gets generated by templates behind the scenes.
  > http://eel.is/c++draft/ bookmark this, you will need it!
Now, about books I would suggest the latest "A tour of C++" by Bjarne Stroustrup; it's ideal for experienced programmers that want to learn modern C++ rather fast.

Other books would be Scott Meyers' Effective Series, Andrei Alexandrescu and Herb Sutter are a must, and of course Jason Turner's "C++ Weekly" series [1]; of course apart from the books, the links I have originally shared are more than enough to cover everything around C++.

[1] https://www.youtube.com/c/lefticus1/videos