TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Which programming language has the best package manager?

48 pointsby reizover 11 years ago

27 comments

haplessover 11 years ago
This guy doesn&#x27;t seem to understand the real differences between java&#x2F;clojure packaging, and scripting language packaging.<p>Ruby&#x27;s &quot;gems&quot; are <i>source</i> packages. When a gem is installed, arbitrary code is executed, C stubs (or even C <i>libraries</i>!) are compiled, and the resulting artifacts can be very different on different systems. Some Ruby gems even modify the Ruby code at install-time. The same is true for Perl (CPAN) and Python (setuptools, pip, etc)<p>Java and Clojure packages are <i>artifacts.</i> Each jar is a finished, built product. If it has JNI stubs, those stubs were pre-built against a specific version. The artifact is identical on every installed system. No arbitrary code is executed. Reasoning about the contents of a Clojure package does not require me to solve the halting problem.<p>The artifact approach is unambiguously better for any production deployment. The source-based approach found in Ruby, Perl, and Python is a problem for me more often than a solution. It is hypothetically great that I can use the same &quot;gem&quot; on OSX and Linux, but it is more important to me that I get consistent deployments on two different Linux systems.
评论 #7070570 未加载
评论 #7070833 未加载
评论 #7070681 未加载
评论 #7070851 未加载
评论 #7070779 未加载
评论 #7073410 未加载
评论 #7070735 未加载
评论 #7070628 未加载
_xo_over 11 years ago
They really should have added CPAN (for perl) to their list. Perl might not be the most popular language nowadays, but in my opinion, their package manager gets a lot of things right...<p>* centrally hosted<p>* mirrored all over the world<p>* packages are automatically checksummed &amp; the checksum is compared on install<p>* is is quite easy to publish packages<p>and very important in my opinion<p>* it encourages you to write tests. Unit tests included in packages are automatically executed when it is installed. Many systems (semi)-automatically report back when the installation of a package fails. Hence you get tests on tons of platforms for your package<p>* pod documentation is automatically available on cpan.
评论 #7070471 未加载
评论 #7070503 未加载
评论 #7070763 未加载
评论 #7070560 未加载
rmrfrmrfover 11 years ago
No clear winner when npm has more dots than all of the others? What&#x27;s the point in even comparing them, then?<p>I think npm&#x27;s approach is pretty cool -- it sacrifices disk space for portability (package dependencies are always installed in the node_packages directory of the package root), so while you might effectively have 3 or 4 of the same coffee-script folder in your install, you don&#x27;t have to worry about virtual environments for development and you don&#x27;t have to worry about dependency upgrades breaking some other package. I think the nature of javascript allows this to be effective considering that many dependencies are smallish snippets of code.
评论 #7070612 未加载
评论 #7070727 未加载
评论 #7070803 未加载
评论 #7070666 未加载
babuskovover 11 years ago
I find it funny that mother of all package managers, Perl&#x27;s CPAN is only mentioned in a footnote.
评论 #7070909 未加载
评论 #7070819 未加载
eepersonover 11 years ago
The details for Maven an Lein are a bit off. They both use the same repositories (I think they even use the same library to download packages) yet they are reported as having different qualities in this area (licensing, mirrors, etc.). I don&#x27;t think licenses are mandatory for either and there are tons of mirrors. You can even create your own pretty easily [1] (at least for the subset of libraries you actually use).<p>[1] <a href="http://www.sonatype.org/nexus/" rel="nofollow">http:&#x2F;&#x2F;www.sonatype.org&#x2F;nexus&#x2F;</a>
评论 #7070697 未加载
FooBarWidgetover 11 years ago
&gt; Usually GEMs are not cryptographically signed! This can lead to security issues! It is possible to sign GEMs, but it’s not mandatory and most developers don’t sign their GEMs.<p>Unfortunately, Nobody Cares About Signed Gems: <a href="http://www.rubygems-openpgp-ca.org/blog/nobody-cares-about-signed-gems.html" rel="nofollow">http:&#x2F;&#x2F;www.rubygems-openpgp-ca.org&#x2F;blog&#x2F;nobody-cares-about-s...</a><p>We&#x27;ve tried making a difference in Phusion Passenger by setting an example, and supporting gem signing (<a href="http://www.modrails.com/documentation/Users%20guide%20Nginx.html#_cryptographic_verification_of_installation_files" rel="nofollow">http:&#x2F;&#x2F;www.modrails.com&#x2F;documentation&#x2F;Users%20guide%20Nginx....</a>). All Phusion Passenger gem releases since 4.0.0 RC 4 (1 year ago) are signed. All our other gems (default_value_for, etc) are also signed. Unfortunately not many people followed.<p>We&#x27;ll continue to sign all our stuff, but it&#x27;s sad that it never took off community-wide.
评论 #7070848 未加载
bryanlarsenover 11 years ago
I have to disagree with this statement: &quot;They learned from the failures of other package managers. It’s almost prefect!&quot;<p>I find the following cons with NPM:<p>- shrinkwrap does not work as well as the alternatives in Bundler (yes, that&#x27;s plural).<p>- specifying versions as git hashes does not verify the hash on &quot;npm install&quot;<p>- npm link is more awkward than using :path =&gt; in Bundler.<p>The big difference between NPM and bundler is that NPM allows common dependencies of dependencies to have different versions. This is usually awesome, except when it isn&#x27;t -- it can cause subtle breakages if you try to pass an object from one dependency to another. This is very rare though, and if I had to choose, I&#x27;d choose the NPM behaviour.
评论 #7071775 未加载
评论 #7078997 未加载
regularfryover 11 years ago
One axis which matters to me which is largely unaddressed here: how easy it is to set up your own package server, and whether the package manager can deal with more than one package source at a time. It&#x27;s mentioned in passing, but it would be good to know how well this works in a little more depth.<p>It&#x27;s virtually trivial to set up a gem server, for instance, but I wouldn&#x27;t know where to start for the others.
评论 #7070927 未加载
Steltekover 11 years ago
He missed my most crucial requirement: Can a package manager support more than it&#x27;s chosen language? Am I forever consigned to vendor lock-in?<p>Every one of these tools is 100% focused on supporting a single language. They go so far as to use that language as the build spec so even attempting to bend it to another platform feels alien. It&#x27;s okay if I only ever want to use Ruby or Javascript will be my thing for the next decade. But what if I want to take my existing npm or gem workflow or knowledge and apply it to a new language? I have to start all over from scratch. I&#x27;ll have no idea how to fetch dependencies or package up my stuff for sharing.<p>If I start to tinker with more than a handful of languages, my head is going to be full of details on package management rather than APIs or library capabilities. Who wants that?
评论 #7071931 未加载
tweissover 11 years ago
Great overview, but do you think it&#x27;s possible to compare package managers between different programming languages? I mean they all work quite differently when it comes to dependencies, build process etc. I&#x27;m a Python coder &amp; pretty happy with PIP and PYPI...
评论 #7070584 未加载
评论 #7070579 未加载
andrewcookeover 11 years ago
fwiw, julia&#x27;s package manager is interesting - it&#x27;s a wrapper around git. i don&#x27;t know the details, but it seems to work well and allows you to have both &quot;standard&quot; and &quot;in development&quot; packages.
negamaxover 11 years ago
As someone who is new to frontend&#x2F;js development; Bower is a life savior.
评论 #7070660 未加载
antiheroover 11 years ago
Seems odd that they&#x27;d totally miss out Pip for Python.
评论 #7070678 未加载
评论 #7070638 未加载
评论 #7070430 未加载
Mikeb85over 11 years ago
I personally am quite fond of Haxelib. First of all, installing Haxe with Haxelib was dirt simple, but what I like is it seems to always resolve dependencies properly, its easy to upgrade single packages, grab dev versions, or upgrade all your libraries at once. Updating the language or Haxelib itself is also easy. And its fast as hell.<p>In fact, installing the entire Haxe toolchain is the easiest I&#x27;ve ever experienced.
marcoshalanoover 11 years ago
Bundler is just a dependency manager, not a package manager. Is the same if you told apt-get is a package manager. Dpkg is a real package manager.
评论 #7072719 未加载
spellbootsover 11 years ago
Rubygems has at least one public mirror: <a href="http://stackoverflow.com/a/17150536/437888" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;17150536&#x2F;437888</a><p>There are also solutions such as <a href="https://github.com/pusewicz/rubygems-proxy" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pusewicz&#x2F;rubygems-proxy</a> allowing you to cache &#x2F; proxy to rubygems.org
评论 #7070717 未加载
stofover 11 years ago
To be exact, Composer allows you to install packages which don&#x27;t have a license, but you cannot publish a package on Packagist anymore if it does not have a license (and packages which were submitted before the license became required are not updated anymore in the registry until they specify the license)
评论 #7072725 未加载
flavor8over 11 years ago
As a long time maven user who recently started using PyPi, I have to say that PyPi is a mess. I frequently get broken packages, timeouts, etc. Most python users seem to have been trained to keep local copies, and&#x2F;or to download once and tarball it up, and don&#x27;t see a problem.
评论 #7072704 未加载
Xorlevover 11 years ago
Also worth mentioning, Maven manages dependencies but it&#x27;s primarily a build system.<p>Gradle is another build system with dependency management.<p>The initial setup of publishing an artifact is high on Maven Central, but Sonatype makes it easier. Even easier is publishing to clojars.
评论 #7072766 未加载
grogenautover 11 years ago
I had real issues with NPM when trying to work on a spotty network connection and offline. It really really wanted to go and hit the network over and over to check versions.
评论 #7070531 未加载
Doctor_Feggover 11 years ago
GEM isn&#x27;t an acronym. It&#x27;s just a name.<p>Sent from my Apple MAC.
评论 #7070632 未加载
bwilliamsover 11 years ago
A much better title to this article would be &quot;Comparing Programming Language Package Managers&quot;.
评论 #7072738 未加载
angersockover 11 years ago
Has anyone tried doing something like npm for C?<p>Or would we consider apt-install &lt;whatever&gt;-dev to be that?
评论 #7070736 未加载
mcostaover 11 years ago
For all the java devs who can scape maven insanity exists ivy.
评论 #7070670 未加载
评论 #7070676 未加载
mac1175over 11 years ago
No Nuget?
评论 #7070617 未加载
vingt-2over 11 years ago
C with no doubt possible.
frowaway001over 11 years ago
I&#x27;d say Scala&#x27;s SBT. Detractors say it&#x27;s too hard, but unlike other build tools, it let&#x27;s you get the job done with minimal fuss.
评论 #7112649 未加载