Hacker Newsnew | past | comments | ask | show | jobs | submitlogin





This 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.

There 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.


You should get in there and put all your expertise to work.

I 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.


You implemented modules in 2017 and they didn't use it?

Today I learnt that Office is an hobby project.

You 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/transl...


My 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.




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

Search: