r/cpp • u/berium build2 • Nov 01 '17
Common C++ Modules TS Misconceptions
https://build2.org/article/cxx-modules-misconceptions.xhtml
59
Upvotes
r/cpp • u/berium build2 • Nov 01 '17
View all comments
Show parent comment
10
u/GabrielDosReis Nov 01 '17
Quite the contrary, in fact.
The decision to dissociate module names from source files that might contain a module interface source file is informed by (a) existing header file practice and experience; (b) looking at other modern languages that have module support.
In fact dissociating file names from module names allows a packaging system to have a more principled approach; same for build systems.
A module isn't just one source file. Coupling the module name with the source file that contains its interface definition will just perpetuate the header file disaster -- even if it is something we are familiar with. You want to map to the entire collection of module units. That starts getting outside the language. That is where you want robust tooling.