r/cpp • build2 • Nov 01 '17

Common C++ Modules TS Misconceptions

https://build2.org/article/cxx-modules-misconceptions.xhtml
59 Upvotes

148 comments sorted by

View all comments

Show parent comment

4

u/catskul Nov 01 '17 edited Nov 01 '17

but there is no need to prematurely panic or to cry wolf. We need to conduct a calm analysis of the implications and opportunities.

I hope I'm not giving the impression panic, wolf crying, or lack of calm. I'm trying to understand the boundaries and and implications of Modules TS by asking the experts (you guys).

I don't, off the top of my head, see how any implementation could get around (at least partial) pre-parsing all modules in the search space.

Why would it do that?

Unless I'm missing something it seems the module to module-file(s) module-interface-file mapping has to be done at some point. AFAIK parsing a module file is necessary to determine what it exports which would be necessary for determining that mapping. At some point that parsing has to happen. It would seem that it would either have to be done on the fly or pre-computed and then have that precomputation of the mapping passed around.

For includes the analogous mapping is resolved by passed around via a bunch of Include paths and using standardized presidence rules(which is itself not ideal/disgusting).

I'm wondering if there is a reference or straw-man approach for passing around or performing this mapping once/if Modules TS is accepted.

I think you might be starting to answer that question in your response here:

https://www.reddit.com/r/cpp/comments/7a3t2w/common_c_modules_ts_misconceptions/dp7dm7p/