
What do dynamic linking and communism have in common? - vinutheraj
http://blogs.sun.com/rvs/entry/what_does_dynamic_linking_and
======
modeless
OK, the analogy is dumb, but the point stands on its own. Dynamic linking has
been around for so long that it's a sort of dogma, never questioned. Of course
you do dynamic linking!

Just step back and consider all the problems dynamic linking has caused us
(DLL hell, package management headaches, C library incompatibilities, various
ABI issues) and the sheer complexity of the systems invented to solve those
problems (Side-by-Side assemblies; InstallShield, Windows Installer, and
umpteen other install frameworks for Windows; LD_LIBRARY_PATH, ldconfig; APT,
RPM, and umpteen other Linux package managers).

~~~
chrischen
Yes the analogy is dumb. Also unregulated capitalism is just as bad as pure
communism. Just as that one eastern country with a communist government had to
loosen it's economy, that one western country (which is doing better than that
one eastern country) had to restrict some of it's capitalism.

~~~
lupin_sansei
I used to think that too, but the data seems to show that more economic
freedom (unregulated capitalism) the better off the people are (per capita
GDP, etc)

[http://commons.wikimedia.org/wiki/File:GM_-
_Countries_by_Eco...](http://commons.wikimedia.org/wiki/File:GM_-
_Countries_by_Economic_Freedom_Index.png)

[http://images.absoluteastronomy.com/images/encyclopediaimage...](http://images.absoluteastronomy.com/images/encyclopediaimages/e/ec/economic_freedom_charts.png)

If unregulated capitalism was just as bad as communism you'd expect this chart
to have a bell curve type shape, rather than it's upward curve:
[http://www.investmentu.com/wp-
content/uploads/2008/02/200601...](http://www.investmentu.com/wp-
content/uploads/2008/02/20060123iub.gif)

You can explore the relative economic freedoms of each country here: notice
that the US is only the #6 free-est economy in the world):
<http://www.heritage.org/Index/Ranking.aspx>

~~~
chrischen
What about the days when we let monopolies roam free??? Perhaps the data only
indicates that the equilibrium is shifted a little more towards the capitalism
side?

I don't understand how your second link argues that less gov control means
higher standards.

I think what we see in the world right now is that there are many more 3rd
world countries with ineffective governments and less economic freedom than
there are countries who are doing well enough to have an economy to _not
regulate._ So in other words it's much harder for a country to go from poor,
low economic freedom to prosperous than it is for a country that already has a
strong unregulated economy to adopt some regulation and go to prosperous.

[http://www.investmentu.com/wp-
content/uploads/2008/02/200601...](http://www.investmentu.com/wp-
content/uploads/2008/02/20060123iub.gif) The graph there probably doesn't
exhibit a bell curve because as soon as a country leads too far right towards
pure economic freedom, it jumps back really fast. And I think enough time has
passed that all the most developed countries have hit that mark and popped
back left a little.

Also I think you should consider the size of countries like Hong Kong and
Singapore, since different principles probably govern economies of different
sizes.

Can you name me one 1st world country without economic regulations? I think
this is evidence enough that there must be some slope leading down to the
state of America in the early 90s, even if that slope is almost vertical.

~~~
lupin_sansei
> I don't understand how your second link argues that less gov control means
> higher standards.

It's missing it's legend unfortunately. Red means economically unfree and
green means economically free.

> as soon as a country leads too far right towards pure economic freedom, it
> jumps back really fast.

I'm not aware of Hong Kong or Singapore (as the 2 leaders of economic freedom)
historically jumping sharply away from economic freedom. The UK and the US
slowly moved away from it in the early to mid 20th century, then moved back
towards it since the 1980s.

Also don't confuse "the right" with economic freedom. Some of the right tends
to support economic freedom to a degree these days, but that hasn't always
been the case.

> Can you name me one 1st world country without economic regulations?

There's no countries anywhere without economic regulations, but with the data
available it appears that the less economic regulations the better the outcome
for people in that society.

~~~
chrischen
It does not have to be a sharp jump, and as I pointed out previously, the jump
from pure capitalism to ideal economy (equilibrium) may not even be a large
one at all.

When I said right and left, I meant literally the right and left of that
chart.

My point was that both pure capitalism and pure communism dont't work, and
that a balance must be struck between the two. The graph may not resemble a
bell curve, but I'm sayig that it should. I explained previous why current
data may not show a bell curve and it's that the data set is too small. The
fact that trends show That more economic freedom leads to better life simply
means that more countries are on the right side of the economic spectrum (more
regulation) moving left than there are left moving right, and I explained the
possible cause to this too (remember a country had to be more developed in
order to even have an economy worth regulating, so more developed countries
were closer to the perfect balance already). I'd also like to add that if
equilibrium is indeed closer to the capitalism side, it too would explain why
the data shows more economic freedom=better life. And this is because given
equal distribution across the spectrum among countries, you would see more
moving left to right if equilibrium is towards the right. But I already
suggested that less developed countries tend to be less economically free,
which means more of those countries start on the left in our current times.
Now i'm not saying that civilizations start out with regulations and moves
towards the right, simply that current data shows less developed countries
with less economic freedom (according to your data, if true). As for
civilizations I believe the position on the continuum oscillates left to right
as the civilization advances until it settles towards equilibrium.

In the end you cannot claim the data shows an unregulated economy to be better
than a completely regulated one. They both suck. :) Thanks, Chris

~~~
lupin_sansei
Where's your example though of an unregulated economy sucking? You haven't
given one, and all the examples we have show that the less regulation the
better.

------
aminuit
"It is probably more illuminating to go a little bit further back, to the
Middle Ages. One of its characteristics was that "reasoning by analogy" was
rampant; another characteristic was almost total intellectual stagnation, and
we now see why the two go together. A reason for mentioning this is to point
out that, by developing a keen ear for unwarranted analogies, one can detect a
lot of medieval thinking today."

Edsger W. Dijkstra

~~~
jfager
How is this reasoning by analogy? He makes the rhetorical comparison to
communism, but his point doesn't depend on that comparison in any way at all.

~~~
aminuit
_The rest of this article discusses why dynamic linking does not deliver on
any of its promises and why, just as communism, it might be an idea that only
works in an ideal world._

He depends on that comparison because the rest of his argument is lacking.

His first example, the one about the broken C++ ABI, isn't really an argument
against dynamic linking. C++ binary compatibility has always been a nightmare
because different groups refuse to agree on a standard. It's a ding against
C++, but not dynamic linking per se. For any solution to the problem he's
trying to solve, there are going to be pathological cases that perform poorly.
Poor C++ ABI standardization seems to be one of those cases for dynamic
linking.

He also doesn't really consider the world before DSOs. Consider maintaining a
machine (or lots of machines) where every package was statically linked
against different versions of the same core libraries. What happens when a
vulnerability is discovered in one of those libraries? How do you know which
packages are vulnerable? Do really want to upgrade every single package on
every machine if there is a libc vulnerability?

~~~
jfager
If you took out the references to communism, his argument would still be
there, it has no actual dependence on the analogy he's using rhetorically.
Your critique in this follow-up comment is a lot more useful than dismissing
his claim as a simple logical fallacy when it isn't.

 _What happens when a vulnerability is discovered in one of those libraries?_

Actually, he directly addressed that issue, by pointing out that updating a
shared library when you find an issue with it may break some of the
applications that link to it. You might (and I do) disagree with him that this
means dynamic linking is bad (imo, downstream projects that choose to take on
an upstream dependency have the obligation to know how that dep is intended to
be used), but it's not really helpful to the discussion to pretend like he
didn't consider it.

------
jacobolus
Yay for irrelevant analogies! Who cares if they shed any light on the topic
whatsoever?! Let’s give red-blooded patriotic Americans something we can all
get behind, hatred of the dirty commies!

You know what else dynamic linking is up to, Mandrake? Sapping and impurifying
all of our precious bodily fluids.

~~~
pvg
Sometimes a catchy title is just a catchy title. Perhaps you've been so
damaged by the misuse of this - actual dreadful, extended, fatuous analogies
between one thing and something rather unrelated/inflammatory that you recoil
at the mere sight. This is understandable but in this case, the author doesn't
actually make any serious analogy with communism - just a passing reference to
'ideas that sounded good but didn't work out in practice' to get his critique
of dynamic linking going. It's a harmless (albeit worn-out) device - it's you
who might be red-bloodedly over-reacting.

~~~
scott_s
If I am forced to take the mental effort to disentangle the actual argument
from the irrelevant analogy, I'm probably going to save the effort and skip
all of it.

~~~
pvg
This kind of 'disentangling' can certainly be grating and tiresome but there
isn't any to do here. One mention in the title. One mention in one of the
lead-in sentences. That's it. It's just a (mercifully very brief) attempt to
be catchy. It may be lame but there really is no analogy to disentangle here.
The rest of the verbiage consists of specific technical points. If you find
that sort of thing so onerous ('forced to' sounds like the author personally
sent you to the Gulag) you likely experience great difficulty and mental
fatigue reading most blogs since they tend to be stylistically lax.

------
lisper
There's a simple counterexample to this argument: operating systems. If it
were not possible to create shared code, it would not be possible to write
operating systems, which are nothing but shared code. Shared code does demand
more careful management and versioning, especially of interfaces, and if you
don't do that you are indeed hosed. But if you do then you aren't.

------
alecco
Libraries also open up a gate to exploits. For example the return to libc
technique.

<http://en.wikipedia.org/wiki/Return-to-libc>

------
pedrocr
There are clearly downsides to dynamic linking but static linking would fail
spectacularly when there is a bug in a common library, like libc. One of two
things happens:

\- Some applications are not updated and retain the bug. Extremely dangerous
if it is a security bug.

\- Suddenly your package manager needs to update almost every single
application on your system. All the packages in my Ubuntu system is a total of
~1GB. Now that you statically compiled them prepare for a very long download.

The problems presented are largely solved in integrated distributions (like
Linux distributions or Apple software). Where this isn't as clear is when
external parties are trying to distribute software in a non-coordinated way
(most apps in Windows, non-Apple apps in OSX). In those cases static linking
probably makes sense but even then I'd say you are better off linking
dynamically to fairly standard stuff like libc.

------
abecedarius
Couldn't you get the space efficiencies without the incompatibility headaches
by naming the library like libfoo-SHA1_AS_LONG_HEX_STRING.so in addition to
libfoo.so.1.2.3? They're already using symlinks in the lib directories.

~~~
wmf
This assumes that libraries are fully parallel-installable, which is often not
the case in Unix. I think .NET does something like this, though.

------
astine
Pfft. Dynamic Linking isn't broken, Solaris is. For some reason I don't have
nearly the same amount of trouble handling dynamic libraries on Linux or BSD
as I do on Solaris. If code depends on bugs, then the code is broken and
_that_ is a bug. Packaging your own special version of a library may solve
your problems in the short term, but it increases maintenance in the long
term. This is the same whether you do it statically or dynamically.

------
RyanMcGreal
They're both supported/opposed fanatically by ideologues?

------
wingo
zlib security vulnerabilities, anyone? Or gecko, for that matter...

------
ilyak
Dynamic linking works just fine. You don't want your every app to carry its
bits of glibc inside, same for libx11, same for openssl. And it's definitely
more polished than gems or jars or whatever other languages have; maybe only
perl/cpan comes close.

On other hand, C++, with its writhing ABIs and changing mangling rules is
definitely not suited for dynamic linking.

They could make their Class.forName() one day, but they were too arrogant and
now it would never work okay. The solution is to restrict C++ usage.

------
protomyth
Generally when I see article with really, really stupid analogies, I assume
the article is not well thought out and probably of poor quality. As a rule of
thumb, it gives pretty good results.

