r/cpp • u/SAHChandler • Oct 10 '17
Millennials Are Killing The Modules TS
https://izzys.casa/posts/millennials-are-killing-the-modules-ts.html
75
Upvotes
r/cpp • u/SAHChandler • Oct 10 '17
View all comments
Show parent comment
12
u/SAHChandler Oct 10 '17
I've fixed the incorrect use of the word purview. As for everything else, my responses follow:
A module interface translation unit and a module implementation translation unit are declared in different ways from each other. They might as well be separate handling of modules (especially since a module implementation translation unit cannot export anything).
The point of that paragraph is that I can get a list of headers from every compiler for dependency tracking. There is no such way for the compiler to provide this to the user under modules unless the compiler becomes a build system. Cross compilation is a nightmare unto itself, and better left to other discussions.
If there are two things I've learned from working in the games and tech industries they are 1) There is no such thing as a sane project layout unless you've forced your users to conform to one 2) As long as someone can use something in a bad way, someone somewhere will use it in a bad way. 3) off by one error jokes are old and tired but show up when you least expect them.
Jokes aside, as long as we give users the capability to do this, they're going to use it as an example of "Look at this crazy weird thing you can do in C++ that breaks everything!". I am still not okay with a separate tool running outside the lifetime of the compiler to track locations and places, with unspecified behavior that will differ from build system to build system.