A deep dive in C++20

Koen Vervloesem
Reading time: 3 minutes

C++ has evolved a lot over time. Software engineers who are still using outdated paradigms of the programming language don’t realize its potential to the fullest. In his “C++ fundamentals” training at High Tech Institute, computer programming enthusiast Kris van Rens introduces C++20, including topics like templates and ranges.

Over the years, many programming languages have been proposed as alternatives to C++. Nevertheless, this hasn’t made C++ any less relevant, computer programming enthusiast Kris van Rens insists. “There are millions of lines of C++ code in production, and a substantial number of engineers in the industry are trained in the popular programming language.”

One of the challenges of mastering C++ is the sheer size of the language, Van Rens notes. “C++ is an old language and it has become quite vast and relatively complex due to the multitude of new features that it has received over time. As a result, many C++ developers have built up their language knowledge in fragments, without a clear, comprehensive view.”

Van Rens aims to offer this comprehensive view on the programming language in his 4-day training course “C++ fundamentals,” organized by High Tech Institute. In this training, he introduces the fundamentals of modern C++ to software engineers of all levels, whether it’s their first contact with the programming language or whether they want to update their knowledge of older C++ versions.

Kris van Rens is giving a free introductory session on modern programming trends on 28 May in Eindhoven.

A living language

As C++ and its tooling have changed a lot over time, it’s easy to get stuck learning outdated paradigms. Van Rens cautions: “Many books and online resources are still teaching older versions of C++, thereby restricting you from realizing the language’s potential to the fullest.” C++ as a language is still very much alive, with new versions appearing every three years, and major feature updates at least every six years. “It’s up to software engineers and their employers to keep up-to-date with the language changes and benefit from the new features,” Van Rens opines.

Van Rens covers C++20 in his training, including powerful topics like templates and ranges. “This C++ version from 2020 is fully supported by most of the latest toolchains, and in industrial production environments, its adoption is relatively new. Maybe some participants of the training might not be able to apply C++20 directly in their environment. However, they’ll be able to identify the potential improvements and changes that C++20 will bring to their code. This way, they’ll hopefully be able to contribute to a future migration to newer C++ versions in their company. During the training, I also highlight the features of C++20 that were absent in earlier versions of the language.”

The “C++ fundamentals” training spans over four days in total, divided into two blocks of two full days, with a week’s break in between. “I cover the basic elements of the language in the first two days, followed by a more in-depth dive during the next days. The focus is on building a solid foundational knowledge of C++, and on knowing where to find sources for further professional development in C++,” Van Rens summarizes the training. He spends about half of the training duration on in-class exercises, all derived from his practical experience as a seasoned C++ software engineer. For those eager to delve even deeper, there are a couple of larger homework exercises.

Software safety and security

A new theme in the domain of programming languages is the shift to stricter regulations around software safety and security. This will influence every field of software development, Van Rens emphasizes. “Software engineers will likely have to provide more assurances about safety and security.” The two main approaches for this are the use of a memory-safe programming language like Rust or the use of a language with garbage collection to eliminate manual memory management.

Although C++ isn’t a strictly safe programming language, Van Rens attests that C++ code still has its place in the application landscape. “Perhaps in the distant future, C++ might evolve to accommodate strict safety requirements, but not at this moment. However, using the right discipline, guidelines and tools, working with C++ can be mostly safe. This comes without hard guarantees, yet it might be ‘safe enough’ for your purposes.”

This article was written in close collaboration with High Tech Institute.

Related content