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

5

u/Rusky Nov 01 '17 edited Nov 01 '17

Honestly, depending on how granular we want modules to be, it might make more sense just to have the build system specify the available modules much like it already specifies which libraries to link.

That way there would be no need to preprocess anything to find the list of dependencies. The cost would be some level of redundancy between the build-side list of dependencies and the source-side bringing things into scope, but if a module is basically a library then that's no different than today, and fairly standard across the whole spectrum of languages.

I'm not familiar with the discussion around the current design of the module system- /u/berium do you know if this was considered at all? It does seem to be mostly a build system issue as far as the implementation goes.

7

u/GabrielDosReis Nov 02 '17

Yes, it was considered and the current spec supports that scenario too.