r/cpp • u/tartaruga232 MSVC user, r/cpp_modules • Apr 21 '26
Uneeded Recompilations When Using Partitions
https://abuehl.github.io/2026/04/20/unneeded-recompilations-when-using-partitions.htmlThis blog posting from me about C++ modules explains in detail what causes unneeded recompilations using detailed code examples from the sources of our UML Editor.
It's a precise description and a showcase of what's the status quo in the C++ standard.
Quote from the posting:
The C++ language currently lacks a concise and easy to use alternative for explicitly expressing the minimally required dependencies on partitions.
(Note: All code examples shown or linked from the text are 100% standard conformant.)
Thanks in advance for comments. Please ask if you do not understand anything or anything is unclear. I would appreciate if you could leave a comment if you don't like anything. Thanks for reading!
View all comments
Show parent comment
1
u/tartaruga232 MSVC user, r/cpp_modules Apr 23 '26
It's still a pity that the syntax
"module M;"has already been taken. On a brown field, we should define the semantics of that to not import M.Modules are something which are meant for the coming decades. The adoption has been pretty low so far. I think changing the semantics of
"module M;"should be possible. After 10 years of modules in the standard, doing that would be really difficult. But is it really impossible now?We would definitely use that if it gets in, but I don't think that exact syntax has a chance. As (I think) u/pavel_v already noted, the colon is very difficult to spot for readers of the code.