1 points · by niekb · 2y ago · 1 comment
All these complications come down to this single point. You don't have to treat module files as header files. Rust internally uses the exactly identical strategy (C++ `-fmodule-file=name=path` vs. Rust `--extern=name=path`) and even has an `@argfile` option to handle too long arguments, but doesn't suffer from this issue because a crate is much larger than a mere header file and Cargo generates all these arguments on the fly anyway. Rust might still want to have implicit `--extern` flags in the future, but if Rust seems fine for now, why shouldn't C++ be?