"Prove to me that it is impossible to write a fast C++ dependency resolver" is such an utterly batshit insane position to take. I guess he views C++ modules just a masturbatory exercise and so it doesn't matter if anyone can actually figure out how to implement them as long as the committee can just blame the tool makers for just not being smart enough?
Twitter is terrible at subtlety. I understand where JF is coming from. It seems wrong that a good scanner can't be written. And I think he's right, scanning for `import X` is not hard, nor is `module X`. There's some issues with the pre-processor, but it's probably manageable.
The snag, and this is the non-obvious part, is that isn't quite enough. Depending on the module foo doesn't say what specifically you depend on. Existing build technology really likes physical files and timestamps to track things. You have to put together that quux.cpp produces the bmi for module foo that bar.cpp is depending on. And it's right now open research on how to do it without causing other problems, like compiling quux.cpp multiple times. Or finding quux in the first place.
83
u/Plorkyeran Jan 28 '19
"Prove to me that it is impossible to write a fast C++ dependency resolver" is such an utterly batshit insane position to take. I guess he views C++ modules just a masturbatory exercise and so it doesn't matter if anyone can actually figure out how to implement them as long as the committee can just blame the tool makers for just not being smart enough?