6 ms·
What do dynamic linking and communism have in common?
- jacobolus 17y agoYay 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 17y agoSometimes 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 17y agoIf 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 17y agoThis 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.
- protomyth 17y agoGenerally 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.
- aminuit 17y ago"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 17y agoHow 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 17y agoThe 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 17y agoIf 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.
- alecco 17y agoLibraries also open up a gate to exploits. For example the return to libc technique. http://en.wikipedia.org/wiki/Return-to-libc http://en.wikipedia.org/wiki/Return-to-libc
- astine 17y agoPfft. 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.
- modeless 17y agoOK, 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 17y agoYes 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 17y agoI 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_Economic_Freedom_Index.png http://commons.wikimedia.org/wiki/File:GM_-_Countries_by_Eco... http://images.absoluteastronomy.com/images/encyclopediaimages/e/ec/economic_freedom_charts.png http://images.absoluteastronomy.com/images/encyclopediaimage... 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/20060123iub.gif http://www.investmentu.com/wp-content/uploads/2008/02/200601... 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 http://www.heritage.org/Index/Ranking.aspx
- chrischen 17y agoWhat 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/20060123iub.gif http://www.investmentu.com/wp-content/uploads/2008/02/200601... 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.
- abecedarius 17y agoCouldn'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 17y agoThis assumes that libraries are fully parallel-installable, which is often not the case in Unix. I think .NET does something like this, though.
- lisper 17y agoThere'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.
- RyanMcGreal 17y agoThey're both supported/opposed fanatically by ideologues?
- pedrocr 17y agoThere 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.
- wingo 17y agozlib security vulnerabilities, anyone? Or gecko, for that matter...
- ilyak 17y agoDynamic 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.