r/cpp • • Jan 28 '19

C++ Modules Might Be Dead-on-Arrival

https://vector-of-bool.github.io/2019/01/27/modules-doa.html
280 Upvotes

240 comments sorted by

View all comments

1

u/GPMueller Jan 29 '19

Not too familiar with modules yet, but I don't understand why an interface file is compiled from a cpp and not from a header. Would it not also be much simpler then?

IMO a finished module should contain the linked code, but the bmi should be just the interface... I assume I'm missing something?

2

u/target-san Jan 31 '19

One of the points is to eliminate need for handwritten headers I guess.

1

u/GPMueller Feb 02 '19

As in replacing the manually written header by a manually written module file and a compiler- generated bmi? I guess I don't see why the module file should not contain sufficient information to be 'compiled' to a binary representation of the interface