3 ms·
> The important benefit is dynamic linking. The ability to change which library is being used without needing to rebuild the main program is really important.
by bch 5y ago
> The important benefit is dynamic linking. The ability to change which library is being used without needing to rebuild the main program is really important.
Or just having the option of loading the library at all. If you don’t need the functionality offered by libxyz, you’re not required to use it. One then has no end of language extensions that can be loaded into a generic interpreter to fit a script to whatever job they have at hand.
Edit: Linus touched on this as a last point:
> Or, for those very rare programs that end up dynamically loading rare modules at run-time - not at startup - because that's their
extension model.
My question: is it actually rare?
- mypalmike 5y agoIt is rare compared to the usual pulling in of required dependencies during build.
- estebank 5y agoMost applications don't have runtime extensions. The few that do, really need them in order to be useful. I'm convinced that there's a Pareto Distribution where 20% of libraries really benefit from being dynamically loaded, where the remaining 80% is better served by static linking. Given that, it seems to me that dynamic linking should be both opt-in and properly supported, but the one that decides that should be the library maintainer.