|
Boost : |
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2024-04-09 13:14:00
On 4/9/24 15:31, Rainer Deyke via Boost wrote:
> On 08.04.24 20:29, Robert Ramey via Boost wrote:
>> The more I read this thread, the more it seems to me that modules are
>> just a bad idea. We already have shared libraries which are
>> redistributable and that's already a hassle given all the compiler
>> switches. shared libraries have the same issue in that if one only
>> want's to use one function, the whole library has to be shipped.
>
> This does not follow. Shared libraries have problems, therefore modules
> (which /solve/ many of these problems) are a bad idea? What?
>
> I'm picturing a future where modules (in source code form) become /the/
> way to distribute C++ libraries.
Your system won't run the C++ modules, someone has to compile them
first. Build systems aren't going anywhere, as well as compiled libraries.
>Â Advantages:
>  - No more messing with build systems for the library author. Just
> ship the source code.
Shipping the source code is not new. Building libraries from source is
also not new.
> Â - No more messing with library build systems for the library consumer.
Unless the consumer doesn't want to compile the dependencies all the time.
> Â - Unified build system does not need to differentiate between user
> files and library files.
> Â - Consistent macro-based configuration for all libraries, not just
> header-only libraries
I'm not sure what the above two mean.
> Â - No shared libraries = aggressive dead-code elimination at build
> time, resulting in massive reductions of code size.
> Â - No shared libraries = programs can ship as a single executable file.
Again, not going to happen.
Monolithic executables, while may be convenient in a portable usage
scenario, are a problem in terms of maintenance and resource consumption.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk