Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

do you have a good template (pun intended) on how to best learn modern c++? coming from Go and Typescript which have very mature devX tooling, c++ is a landmine to navigate. and that's when I already have professional experience with it (the place just didn't have strong c++ culture)


Try watching the "back to basics" videos from the last 4 years' cppcons.

But that's mostly learning modern paradigms of the language.

If you also mean the tooling, then it depends: Learn CMake which is sort of an industry standard. There are books and videos, but for a concrete experience, try looking through the CMakeLists.txt of some non-trivial C++ open source project.


With regards to CMake, look at professional CMake by Craig Scott.

Probably the best resource for CMake modern best practices/ rational of those practices.

Most tutorials online are outdated, CMake documentation is hard without a firm mental model of how it works.


>CMakeLists.txt

You say that like there's one for a project but I've been learning Blender's codebase and every folder has a CMakeLists.txt. What gives?


Make sure you have a good linting/static analysis setup.

Use clangd, clang-tidy, cppcheck. (These will tell at you if not using best practices)

Use the stl as much as possible (or at least make "would this work using stl" your go-to question.

Write a vector with iterators from scratch in c++20


Modernes C++ & Scott Meyers' 'Effective Modern C++' are excellent.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: