TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The scalability of C++ module implementations or lack thereof

1 点作者 niekb9 个月前

1 comment

lifthrasiir9 个月前
&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?