The fact that we're half a decade or better into investigating this capability and these sort of questions are still up in the air is mind-boggling. The fact that it's a real consideration of whether modules might be standardized without the experience of applying it the standard library is SUPER sketchy. I know I'll be sitting down with my organization's standardization representative this week.
Microsoft and Google have such experience on their compilers and they are the ones driving the modules design.
All the modules FUD that I have read so far, seem to be basically people wanting to keep doing everything they do with header files, while at the same time getting modules and not changing anything on the build infrastructure.
Languages born with modules don't process each module twice, and many e.g. .NET do actually compile their modules in parallel.
So yes it is FUD, because while it might not be possible with existing build scripts, Unity builds and what have you, it doesn't mean that it wouldn't be possible to do the same with some C++ related tooling improvements.
Languages born with modules also don't have the same parsing requirements as C++, where the full types of imported entities must be known to proceed. Features there do not automatically apply to C++ modules.
Please do describe these "C++ related tooling improvements" that would fix the issue, because people here would be extremely interested to hear them.
And keep in mind that if these improvements involve "turn the compiler into a build system," they are highly unlikely to happen- that is, performing just a parse of dependencies and then proceeding in parallel across all TUs would be possible, but would also require teaching the compiler more than it currently knows.
We can have those abilities with modules in C++, they just require changes to the module design rather than (just) compilers. That's what people are trying to get at here.
138
u/Auriculaire Jan 28 '19
The fact that we're half a decade or better into investigating this capability and these sort of questions are still up in the air is mind-boggling. The fact that it's a real consideration of whether modules might be standardized without the experience of applying it the standard library is SUPER sketchy. I know I'll be sitting down with my organization's standardization representative this week.