[kwlug-disc] Zig's guy interview
Ron
ron at bclug.ca
Tue Jun 2 20:23:48 EDT 2026
D. Hugh Redelmeier wrote on 2026-05-31 06:52:
> I assume that the problem is that, by default, Zig binaries are
> statically linked. That means that every program carries its own copy
> of each library that it uses. As I understand it, static linking is
> the default for Rust and Go too. This strikes me as a terrible idea.
I'll disagree. A couple reasons:
1. How else to run two different versions of an application, each using
different library versions?
2. The devs do not want bug reports due to distro system library
incompatibility
3. Item #2 is the second most frequent frustration(as I understand
it) in bug reports after AI slop bug reports
For system applications, shared libraries are the way to go, for sure.
> - so many programs needing to be rebuilt whenever a bug is fixed in a
> library. How do you even find which programs? Whose job is it to find
> them?
The authors.
> Shared libraries have been working well on UNIX since the 1980s. Linux
> copied UNIX fairly early on.
It's not the 1980s any more, we do some things differently now. For one
thing, there's been exponential growth in software choices where
incompatibilities can arise.
> I admit that not all libraries should be shared:
Oops, I should have read all the way before replying...
> - if library specifications are mutating rapidly, the advantages of
> sharing disappear and the disadvantages multiply. This is most likely
> in young libraries: perhaps libraries should graduate to shared when
> they are thought to be stable.
Fully agree. Rust, Go, etc. make sense to link statically as they're
relatively new. Maybe after a decade, dynamic linking will make more
sense here?
> - if a library isn't getting monotonically better, your dynamically
> linked program may grow new bugs. The more programs share that
> library, the sooner such bugs are found and fixed.
If library X is used by package Y and package Z, it shouldn't matter how
library X is linked?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20260602/12bb65c8/attachment.htm>
More information about the kwlug-disc
mailing list