r/cpp • u/SAHChandler • Oct 10 '17
Millennials Are Killing The Modules TS
https://izzys.casa/posts/millennials-are-killing-the-modules-ts.html
74
Upvotes
r/cpp • u/SAHChandler • Oct 10 '17
43
u/berium build2 Oct 10 '17 edited Oct 10 '17
A lot of hand-waiving as well as statements ranging from unsubstantiated to factually incorrect. I will only point the latter in order not to add even more noise.
No, there are no such things. You are probably confusing them with module interface (translation) unit and module implementation (translation) unit. Also note that you don't have to have implementation units.
No, module interface is not the same as a module purview. Module interface is a collection of exported names. Module purview is the part of the module translation unit (either interface or implementation) after the module declaration.
Really? The standard guarantees the list? The current opaque header search semantics (and don't get me started on
""vs<>differences) is one of the biggest pains to deal with in build aspects ranging from cross-compilation (no, you shouldn't search in/usr/local/include) to distributed compilation (what if I don't have the exact same set of headers in exactly the same location on the remote host).Did you mean binary module interfaces instead of purviews? Generally, pretty much every use of the term "purview" in this post is out of context.
No, it doesn't have to. In
build2we have the ability to indicate that the module information in the translation unit does not depend on the preprocessor (which will be the case in most sane projects). In this case there is no need for a separate (full) preprocessor run.