Implementing C++ Modules: Lessons Learned, Lessons Abandoned – Cameron DaCamara & Gabriel Dos Reis

  • Lobby
  • Science & Technology
  • Implementing C++ Modules: Lessons Learned, Lessons Abandoned – Cameron DaCamara & Gabriel Dos Reis

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
C++ Modules were designed to bring more safety to your programs, while dramatically reducing compile time, resulting in overall increased productivity. How can your C++ toolchain meet this challenge? What can you do to take advantage of these new functionalities available in your toolbox? In this talk, we share lessons learned from implementing Modules based on the singular idea of providing robust support through the entire toolchain (from the lexer through the linker, the IDE, the build system, etc.), debunking the misconception that C++ Modules are just some syntactic sugar that is compiled away by the front-end. The challenges that any C++ compiler implementer faces include: (1) how to satisfy the requirements of merging materialization of declarations -- needed for sound handling of the global module fragments, in particular, as found in header files and header units – with associated performance cost; (2) how to take advantage of the One Definition Rule guarantees provided by named modules. They must address those challenges without compromising efficiency and static semantics. These lessons are valuable not just to C++ tools developers, but to ordinary C++ programmers as well, shedding light on how speed and safety gains are achieved by staying close to the spirit of the original C++ Modules design (“take the ODR as foundational”), and how you can put them to good use in the architecture of your programs and libraries.

---
Cameron DaCamara

Senior software engineer at Microsoft working on the MSVC front-end team. Primary area of focus is C++ Modules and compiler evolution.

Gabriel Dos Reis

Gabriel Dos Reis is a Principal Software Engineer at Microsoft, where he works in the area of large scale software construction, tools, and techniques. He is also a researcher, and a longtime member of the C++ community, author and co-author of numerous extensions to support large scale programming, compile-time and generic programming. His research interests include programming tools for dependable software. Prior to joining Microsoft, he was Assistant Professor at Texas A&M University. Dr. Dos Reis was a recipient of the 2012 National Science Foundation CAREER award for his research in compilers for dependable computational mathematics and educational activities.

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

No comment yet, add your voice below!


Add a Comment