Modern C++ Lamentations

Rubn where at is.this
Fri Jan 4 12:54:12 UTC 2019


On Friday, 4 January 2019 at 03:48:49 UTC, Jonathan M Davis wrote:
> though honestly, in general, I don't see any reason to use 
> shared libraries for anything other than plugins (whether 
> you're talking about *nix or Windows). If you're dealing with 
> system libraries that are shared by a ton of programs on the 
> system (e.g. openssl on *nix systems), then using shared 
> libraries can definitely be worth it (especially when the 
> library is likely to need security updates), but if you're 
> distributing a program, static libraries are far easier, and if 
> a library isn't used by many programs, then I think that the 
> simplicity of static libraries is worth far more than the small 
> space gain of using a shared library. It's just with plugins 
> that you really don't have any choice.

Here we go again. Really? You don't think there is any reason to 
using shared libraries in anything other than plugins? You then 
go on to list two other valid reasons in your next run on 
sentence. I'll add some more to your list: treating code as data 
is another reason. Hot loading code so you don't have to restart 
your program which can be time consuming. Would not work without 
a shared library. Modifying applications, though I guess from 
your perspective this might be niche. It would not be as elegant 
without shared libraries. You keep bringing up this size saving 
rationale, no one has said this other than you.



More information about the Digitalmars-d mailing list