3 ms·
Good. Let me use modules!
by jjmarr 1y ago
Good. Let me use modules!
- 1718627440 1y agoYou can always specify the language version in your compiler invocation.
- albertzeyer 1y ago> Presumably we still wouldn't enable Modules by default.
- whobre 1y agoSeriously, why? They are broken. https://vector-of-bool.github.io/2019/01/27/modules-doa.html https://vector-of-bool.github.io/2019/01/27/modules-doa.html
- suby 1y agoThis is from 2019, prior to the finalization of modules in the standard. I'd be interested in how many of these issues were unaddressed in the final version shipped.
- Maxatar 1y agoThere isn't much of a final version shipped. It's pretty well understood that modules are underspecified and their implementation across MSVC, clang, and GCC is mostly just ad-hoc based on an informal understanding among the people involved in their implementation. Even ignoring the usual complexity and ambiguity of the C++ standard, modules are on a whole different level in terms of lacking a suitable formal specification that could be used to come close to independently implementing the feature. And this is ignoring the fact that none of GCC, clang, or MSVC have a remotely good implementation of modules that would be worth using for anything outside of a hobby project. I agree with the other commenter who said modules are a failure of a feature, the only question left is whether the standards committee will learn from this mistake and refrain from ever standardizing a feature without a solid proof of concept and tangible use cases.
- pjmlp 1y agoToday I learnt that Office is an hobby project.
- Maxatar 1y agoYou learned nothing because the extent of your knowledge tends to be rather superficial when it comes to C++. Office does not use C++ modules, what Office did was make use of a non-standard MSVC feature [1] which reinterprets #include preprocessor directives as header units. Absolutely no changes to source code is needed to make use of this compiler feature. This is not the same as using C++20 modules which would require an absolutely astronomical amount of effort to do. In the future, read more than just the headline of a blog post if you wish to actually understand a topic well enough to converse in it. [1] https://learn.microsoft.com/en-us/cpp/build/reference/translateinclude?view=msvc-170 https://learn.microsoft.com/en-us/cpp/build/reference/transl...
- pjmlp 1y agoMy dear, I have written more C++20 modules code than you ever will. Feel free to roam around on my Github account. Also go read the C++ mailings regarding what is standard or not in modules.
- CyberDildonics 1y agoYou should get in there and put all your expertise to work.
- Maxatar 1y agoI did prior to 2017. I realized the committee was 75% politics and people with a lot of time and devotion pushing their pet projects, and about 25% about addressing actual issues faced by professional engineers and decided it was no longer worth the time and effort and money. The committee is full of very smart and talented people, no dispute about that, but it's also very silo'd where people just work on one particular niche or another based on their personal interests, and then they trade support with each other. In discussions it's almost never the case that features are added with any consideration towards the broader C++ audience.
- forrestthewoods 1y agoModules will never been commonly used in C++. It’s a failed feature.