Frankly i think package managers are part of the problem, rather than the solution.
From personal experience using a less elaborate variant of what nixOS/Guix offers (Gobolinux), ld and friends are quite adept at getting multiple lib versions sorted via sonames.
But package managers do not use anything like sonames for resolving dependencies.
This because foobar-1.0 and foobar-1.1 can't be installed at the same time. Instead you would have to do something like foobar-1.0 and foobar2-1.1, even though foobar2 is actually a minor upgrade to foobar.
This because the logic of most package managers balk at having two packages with the same name, but different versions, installed at the same time.
From personal experience using a less elaborate variant of what nixOS/Guix offers (Gobolinux), ld and friends are quite adept at getting multiple lib versions sorted via sonames.
But package managers do not use anything like sonames for resolving dependencies.
This because foobar-1.0 and foobar-1.1 can't be installed at the same time. Instead you would have to do something like foobar-1.0 and foobar2-1.1, even though foobar2 is actually a minor upgrade to foobar.
This because the logic of most package managers balk at having two packages with the same name, but different versions, installed at the same time.