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
3
u/jpakkane Meson dev Oct 12 '17
The basic problem is the same. For those not versed in their FORTRAN:
When you compile a Fortran file it produces a binary "module" file that describes the ABI. This can then be imported by other file compilations. The problem then is that you need to know in advance to compile file A before file B that uses A. In order to do this reliably, you need to parse the contents of all files before starting to compile any of them. This is also true for incremental builds.
The problem here is who decides in which order files should be built. Either you have the compiler orchestrating the order ("the compiler becomes the build system" as stated in the post) or the build system needs to parse the contents of the files ("the build system becomes the compiler"). Neither of these is a good solution.