问题描述
我刚刚发现了这个 旧的 C++0x 草稿关于 C++0x 中的模块.
I just discovered this old C++0x draft about modules in C++0x.
这个想法是通过只编写 .cpp 文件来摆脱当前的 .h/.cpp 系统,然后在编译期间生成模块文件,然后其他 .cpp 文件会使用这些文件.
The idea was to get out of the current .h/.cpp system by writing only .cpp files which would then generate module files during compilation, which would then in turn be used by the other .cpp files.
这看起来非常棒.
但我的问题是:他们为什么要从 C++0x 中删除它?是不是因为技术难度太大?时间不够?你认为他们会考虑为 C++ 的另一个版本开发它吗?
But my question is: why did they remove it from C++0x? Was it because of too many technical difficulties? Lack of time? And do you think they will consider working on it for an ulterior version of C++?
推荐答案
来自 C++ 演进状态(旧金山 2008 后),模块提案被归类为标题为单独的 TR:"
From the State of C++ Evolution (Post San Francisco 2008), the Modules proposal was categorized as "Heading for a separate TR:"
这些主题被认为太重要了,不能在发布之前等待 C++0x 之后的另一个标准,但又太具有实验性,无法及时为下一个标准定稿.因此,这些功能将尽快通过技术报告提供.
These topics are deemed too important to wait for another standard after C++0x before being published, but too experimental to be finalised in time for the next Standard. Therefore, these features will be delivered by a technical report at the earliest opportunity.
模块提案还没有准备好,等待它会延迟完成 C++0x 标准.它并没有真正被删除,只是从未被纳入工作文件中.
The modules proposal just wasn't ready and waiting for it would have delayed finishing the C++0x standard. It wasn't really removed, it was just never incorporated into the working paper.
这篇关于C++ 模块 - 为什么它们从 C++0x 中删除?他们以后会回来吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!