Hacker News new | ask | show | jobs
by bishop_mandible 4035 days ago
63 dependency crates? That's insane.
6 comments

Cargo makes it trivial to add dependencies to a project (which themselves may have their own dependencies), and Rust has been designed with versioning in mind from the start so that even incompatible versions of the same dependencies can exist in your dependency tree without any problems whatsoever. 63 dependency crates isn't insanity when your tools take 100% care of them for you. To me, a large collection of dependencies represents a proper and fine-grained separation of concerns.
Last I checked, a 'rails new' gives you over 40 dependencies off the bat.
Yes, the Rails and Node communities are known for insanity.
I put all node functions I might want to re-use in other projects on NPM by themselves (though this also usually pushes me to make a lot of unit tests for each of them, which is a nice benefit). I'm not really clear on what's insane about re-using a lot of small modular parts. This is way better than copying and pasting functions between codebases, and then trying to keep them (and their tests) all in sync.
Node/npm is terrible. Look at Popcorn Time. This client app has over 4000 files in npm_modules. Most of them totally unneeded, and many of them tiny and for things that should be in a stdlib or rolled with others.

I think it's the same kind of folks that create a huge Java object model, always one file per type. Gives the feeling of being big and doing real work, even when you're not.

Let's please not look to Rails to determine the way forward for web development.
I don't see anything wrong with that, particularly when they all get linked into one executable in the end.
So you're saying code reuse is bad?
Yes, it's like anything else: the dose makes the poison.
I'm not sure what that actually means.
The Rust community has tended towards lots of tiny libraries. Hey I made this cool function -> library.
When you need to do 63 things... maybe you need 63 dependencies