DEV Community

Discussion on: What do I need to go back to C++ in 2021

Collapse
 
darshan_tweet profile image
Vincezno • Edited

Keep in mind that damn C++ still evolves fast and keeps adding new stuff, I wrote some tutorial in 2010 and they are already useless.
Said that:

  1. tutorials and books
    C++ Succinctly from Syncfusion, 100 pages, you read it cover to cover.
    OReilly - Effective Modern C++ - Scott Meyers, the only book I follow.
    github.com/isocpp/CppCoreGuidelines the Cpp Core Guideliness.

  2. Compilers
    Clang and GCC have the same features ( as input language, not talking about output format) but I think Clang have better error messages and better code analysis tools.
    Linkers error in GCC are usually gibberish.

  3. IDE
    I didn't do much C++ on Linux recently... Visual Studio is the best I know, CLion is good too.
    Back in the time I enjoyed KDevelop but you will need KDE.

  4. Best way to scaffold a project?
    No clear standard, some people like headers only, some people still do the .h/.cpp separation, modules are not yet used much.

  5. Package managers?
    Pure mess. On visual studio you have NuGet, it works but it's clumsy.
    I like vcpkg (github.com/microsoft/vcpkg) but it's not that common.
    Never tried conan. CMake is usually a good option.

  6. Is it good to use straight away C++20
    Go for it, almost everything is still supported... just most of the older ideas are now bad ideas.

  7. Unit tests.
    I only used GTest so far.

  8. Code Generations via IDE
    No idea, but headers-only is still an option.

  9. How are you doing still working on C++ on 2021?
    It's like driving a tank with lots of button in the cockpit.
    Some of them you need, some you may need, some are useless, some will make the tank explode.
    It's a hell of a language, but I don't know anything better for game programming or low level stuff with class based OOP.

  10. Do you think it is stupid to try to catch up on C++ on 2021?
    If you plan to use it, no.
    If you just want to know it, well I'm studying Scheme, who am I to judge? xD