TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The scalability of C++ module implementations or lack thereof

1 pointsby niekb8 months ago

1 comment

lifthrasiir8 months ago
&gt; Conceptually, module files are identical to header files. We should treat them as such.<p>All these complications come down to this single point. You <i>don&#x27;t have to</i> 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&#x27;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&#x27;t C++ be?