Modules - The Beginner's Guide

Speaker: Daniela Engert

Audience level: Intermediate

Modules are one of the big new language additions which will be part of C++20. Seemingly new, modules were actually available for quite a few years in Microsoft's Visual Studio compiler, serving as some form of a reference implementation of the so-called 'Modules TS'. The other root of C++20 modules is the clang compiler, incorporating ideas from engineers (mostly) at Google with their idea of how a implementation of modules should look like. Eventually the developers of gcc also arrived at the party with a fresh look at modules. After joining forces of all three major players, a common vision of a matured specification of modules was agreed on and voted for inclusion into the next C++ standard.

With this piece of history in mind, I invite you to follow my exploration of the modules ecosystem as it exists today:

  • in a nutshell, what are modules after all?
  • what does a module look like? What are it's basic concepts?
  • are there pitfalls using modules?
  • how do modules benefit me or my team? Or my users?
  • what is the current implementation status in compilers? Are they mature and robust enough for everyday use of modules?
  • what do people need to know if they want to start with creating their first module?
  • is it worth it to leave the trodden path and introduce modules into codebases?

My efforts and experiences of modularizing the {fmt} library are the basis of the exploration.