CppCon 2016: Richard Smith “There and Back Again: An Incremental C++ Modules Design'

preview_player
Показать описание


The Clang project has been working on Modules in one form or another for many years. It started off with C and Objective-C many years ago. Today, we have a C++ compiler that can transparently use C++ Modules with existing C++ code, and we have deployed that at scale. However, this is very separate from the question of how to integrate a modular compilation model into the language itself. That is an issue that several groups working on C++ have been trying to tackle over the last few years.

Based on our experience deploying the core technology behind Modules, we have learned a tremendous amount about how they interact with existing code. This has informed the particular design we would like to see for C++ Modules, and it centers around incremental adoption. In essence, how do we take the C++ code we have today, and migrate it to directly leverage C++ Modules in its very syntax, while still interacting cleanly with C++ code that will always and forever be stuck in a legacy mode without Modules.

In this talk we will present our ideas on how C++ Modules should be designed in order to interoperate seamlessly with existing patterns, libraries, and codebases. However, these are still early days for C++ Modules. We are all still experimenting and learning about what the best design is likely to be. Here, we simply want to present a possible and still very early design direction for this feature.

Richard Smith
Clang hacker, Google
Richard is the code owner of the Clang C++ frontend, to which he has been contributing for over five years. He implemented most of the C++11, C++14, and C++17 features that Clang supports, and brought Clang's modules support up to production quality. | Richard is also the Project Editor of the ISO C++ committee, in which he is an active participant. He proposed or contributed to more than half of the language features added in C++14 and C++17.


*-----*
*-----*
Рекомендации по теме
Комментарии
Автор

Interesting, I am somewhat surprised the topic of gradual transition comes this late. I guess Modules are still years away then.

YourCRTube
Автор

these are wayy above my head ..but still enjoy!! thanks cpp con.

cyberneticgsus
Автор

It's quite sad that the modules are not implemented on top of namespaces since, to me, it's quite the same thing or should the same for the sake of simplicity.

sephirostoy
Автор

Why was the non-modular header non-modular? was it because the function was inline?

MrWorshipMe
Автор

"C++ hello world includes 136 header files on Linux and 195 on OS X"

Whoa you should try "Windows". You need only FIVE (5) headers for the hello world!! However, you have to know how to use C++ in order to avoid including nonsensical stuff unnecessary for the task at hand.

Gontrill