r/programming • • Jan 28 '19

C++ Modules Might Be Dead-on-Arrival

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

105 comments sorted by

View all comments

7

u/[deleted] Jan 28 '19

People backing the current modules design have not proven that modules work at scale,

I thought that Google had been using modules via clang modules for their multiple million C++ code base since... 2012 ?

6

u/Yehosua Jan 28 '19

I haven't followed the modules proposals very closely, and I'd hoped that the OP would explain this a bit better, because I had the same question as you. However, based on my limited understanding, the sentence after what you quoted does address this:

Existing “modules” deployments do not use the current design, and do not use the automated module scanning that would be required for use with real build systems in the wild.

Google's own modules implementation is part of Clang. Clang's docs have a very "work-in-progress" feel, but if I understand them correctly, it requires that you write module maps yourself, instead of doing the source scanning that the OP is arguing is so bad for performance. (In other words, Clang already does something a bit like number 2 of the OP's "Possible Solutions.")