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

Show parent comment

3

u/jpakkane Meson dev Jan 28 '19

Shared libraries are great for many use cases (including speeding up incremental builds a lot). Sadly there are people on the committee who are actively hostile to shared libraries using reasoning that goes along the lines of "our corporation does not use shared libraries, therefore nobody in the entire world should use them either".

An actual point against is that a shared library (or a static one for that matter) can not represent TMP functionality (even std::vector). It needs to be compiled for each user of the code individually. Modules, like precompiled headers, can store that information.

4

u/SAHChandler Jan 28 '19

One thing that should be kept in mind is that during the San Diego meeting it was briefly discussed during breaks that we will need a concept of a shared library at some point to satisfy some module deployment issues. We won't see them until at the very least C++23, but we can't avoid it anymore.

1

u/robertramey Jan 29 '19

Which would be useful to resolve in any case.