r/cpp • • 6d ago

What do you think about modules?

I see lot of people don't like modules how they are now can they can be improved and what can be suitable solution what do you think?

34 Upvotes

77 comments sorted by

View all comments

Show parent comment

1

u/GabrielDosReis 5d ago

I agree such a tool would be useful. In fact, very early on in the Modules TS development, a former colleague of mine wrote such a tool out of the IFC produced by the compiler. It is useful, for instance, when bootrapping a system - the first phase may use stubs whereas the final phase uses the real definition; the rest of consumers just see minimal interface when computing dependencies.

There are some tricky corner cases if you insist on completness of support for all the creative ways people write C++.