logoalt Hacker News

mooracleyesterday at 2:56 PM3 repliesview on HN

cargo works because rust was young enough to be opinionated. try that with npm and enjoy your mass exodus to the next thing that will also betray you

"but bun!" — faster shovel, same hole


Replies

skrebbelyesterday at 4:41 PM

NPM is plenty opinionated. For all its mistakes, it got lots of things uniquely right too. For example it’s very uncommon in JS land to have version conflicts (“dependency hell”). If two deps both need SuperFoo but different versions, NPM just installs both and things Generally Just Work. Exceptions are gross libraries with lots of global state (such as React) but fortunately those are very uncommon in JS land.

People love to complain about node_modules being a black hole but that size bought JS land an advantage that’s not very common among popular languages.

show 1 reply
pjmlpyesterday at 3:39 PM

And only to the extent it is a pure Rust codebase, add a few other languages to the mix, and it becomes a build.rs mess as well.

ragallyesterday at 5:18 PM

Cargo doesn't work. I'm trying to use it in a monorepo and its cacheing story is horrible. The devs refused when I proposed to switch it to Bazel years ago and now they're regretting it.