Follow up on:
Try out C++20 Preview: set up a development environment
Sorting in the C++20 release
When I wrote the posts above, a good year ago, I started to learn the latest evolutions in C++.
I didn't want to just poke around, but do a thorough training. I purchased this e-book: C++ Standard library (also available in print). By Rainer Grimm.
I've used the STL extensively in my job - I was C++ developer in the 2nd half of the 90's. That allows me to use this book to focus on the concepts new to C++20.
I'm trying to temper my enthousism a little, because I am a Rainer Grimm and STL fanboy, but: this is a great book.
As the title indicates, it doesn't focus on new language constructs but on the template library. While doing that, Rainer manages to sneak in a lot of the new language changes.
(I think) that the majority of changes are in the STL and in concurrent programming, so there is significant overlap by default.
For my learning journey, I've set up Eclipse and the latest GNU toolchain for Windows (if you check my other posts: also for Ubuntu, Pi, ..., but I digress).
Then I walked through all chapters, and tried all examples:
image: Eclipse ready to debug a C++ STL example. To avoid that I have to create a project for each example, I created a project for the whole book. When I'm finished testing an example, I exclude it from build and start with the next one.
Having the examples in a debugger, and step through what's happening, is my preferred learning method for software.
I like to bite into the code. Drill into the statements, view variables, view changes.
That way, they stick into my memory forever. If I read - even with full focus - I tend to forget after a while. Stepping through seems to fix the processes in my memory.
The STL book is well organised. There's a natural flow in three ways:
- from overall usable to more specific and niche
- from easy to difficult
- from known traditional concepts to revolutionary changes
The two first, I think, are self explaining. The third subject is less intuitive. But that's where new concepts can be learned that aren't C++ specific, but show where software development is evolving.
I'm name-dropping one: lambda functions. But there's a number of concepts that help to make executable logic object-savvy.
Last kudo is to the C++ governance team, for taking care that the evolution doesn't increase the footprint. Most changes extend the way you can code your intents, without generating a bigger or slower execution. And some of them deal with fat that was added in previous language increments.
image: customer action photo
If you're interested in evolving together with the C++ language: Rainer Grimm's blog Modern C++ contains everything of my book, and more.
Well written, updated constantly, challenging the brain...