Hacker News new | past | comments | ask | show | jobs | submit login
The scalability of C++ module implementations or lack thereof (nibblestew.blogspot.com)
1 point by niekb 7 months ago | hide | past | favorite | 1 comment



> Conceptually, module files are identical to header files. We should treat them as such.

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?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: