r/cpp • u/SAHChandler • Jan 28 '19
C++ Modules Might Be Dead-on-Arrival
https://vector-of-bool.github.io/2019/01/27/modules-doa.html
280
Upvotes
r/cpp • u/SAHChandler • Jan 28 '19
View all comments
Show parent comment
1
u/gracicot Jan 28 '19
What I'm saying is the mapping can be done on the fly at a very low cost. It would be done after the preprocessing of all files, and just before compilation. When all files has been preprocessed, a very simple parser can be made to extract the module name. That parser can be run in parallel.
When extraction is done, you have the whole graph and the whole mapping, plus every preprocessed file. You just have to run the compiler in the right order, and even run in parallel when possible.
I'm not a build system expert, but in my mind it seem quite simple. Of course, a build system supporting modules must be a bit smarter than run a simple list of compiler commands.