Hacker News new | ask | show | jobs
by bluefishinit 1084 days ago
The 2023 version should have "Tools: Dependency Management" and "Tools: Distribution", two areas where dynamic languages have fallen far behind more modern statically typed, compiled languages like Rust and Go.
2 comments

I dunno, I think NPM is rather good. Sure there's a lot of dangerous, sloppy and unnecessary code on NPM, but the actual workflow of using NPM the tool is better than many languages have.
They were never better than Maven and NuGET, regarding the use cases, and corner cases.
Maven is trash, sorry. It can't even perform incremental compilation reliably, plugins download dependencies at execution time (making caching dependencies on CI a pain), the dependency resolution mechanism in the case of conflicting dependencies seems... random? [0], and so on. Gradle seems marginally better (and more modern), but it's also somehow overcomplex and easy to create a mess.

I can fault Ruby for many things, but Bundler is easy to use and just works (except in the case of C bindings, but I don't think that's in the scope of Bundler to fix), and from what I hear, cargo should be similar.

[0] Although this is also an ecosystem problem; in e.g. Ruby, libraries specify version ranges for subdependencies, and then Bundler will try to resolve all version ranges, and report an error if there's no way to resolve it. Usually, this works quite well. A Java library A will just specify a particular version of library B, you have no guarantee that the version of B that you get when you add A to your build is the same one. There are various solutions to this, such as BOMs, but if the library you use isn't in a BOM, you're out of luck. In any case, this is not a theoretical problem, I've spent countless hours trying to debug problems with conflicting dependency versions causing errors at runtime because certain classes or methods didn't exist.

It is still better than many alternatives, and the lengthy description about Ruby kind of proves my point.
How does it prove your point?

I feel like you should be more specific instead of replying with a one-liner to a list of very specific complaints.