Re:Self Propagating NPM Malware Compromises over 40 Packages
by cxr on Tuesday September 16, 2025 @08:45AM
(#45261471)
It's not possible for a language to have an insane dependency tree. That's an attribute of a codebase.
[ Parent
| on HN ]
Re:Self Propagating NPM Malware Compromises over 40 Packages
by orbital-decay on Tuesday September 16, 2025 @10:42AM
(#45262954)
Modern programming languages don't exist in a vacuum, they are tied to the existing codebase and libraries.
Re:Self Propagating NPM Malware Compromises over 40 Packages
by cxr on Tuesday September 16, 2025 @12:08PM
(#45264151)
Whatever you're trying to say, you aren't.
Re:Self Propagating NPM Malware Compromises over 40 Packages
by kelnos on Tuesday September 16, 2025 @04:20PM
(#45267432)
Sort of, but I don't really buy this argument. Someone could go and write the "missing JS stdlib" library that has no dependencies of its own. They could adopt release policies that reduce the risk of successful supply chain attacks. Other people could depend on it and not suffer deep dependency trees.
JS library authors in general could decide to write their own (or carefully copy-paste from libraries) utility functions for things rather than depend on a huge mess of packages. This isn't always a great path; obviously reinventing the wheel can come with its own problems.
So yes, I'd agree that the ecosystem encourages JS/TS developers to make use of the existing set of libraries and packages with deep dependency trees, but no one is holding a gun to anyone's head. There are other ways to do it.
Re:Self Propagating NPM Malware Compromises over 40 Packages
by WD-42 on Tuesday September 16, 2025 @09:49AM
(#45262259)
Maybe the language should have a standard library then.
Re:Self Propagating NPM Malware Compromises over 40 Packages
by skydhash on Tuesday September 16, 2025 @10:10AM
(#45262486)
C library is smaller than Node.js (you won’t have HTTP). What C have is much more respectable libraries. If you add libcurl or freetype to your project, it won’t pull the whole jungle with them.
Re:Self Propagating NPM Malware Compromises over 40 Packages
by int_19h on Tuesday September 16, 2025 @11:10AM
(#45263387)
What C doesn't have is an agreed-upon standard package manager. Which means that any dependency - including transitive ones! - requires some effort on behalf of the developer to add to the build. And that, in turn, puts pressure on library authors to avoid dependencies other than a few well-established libraries (like libpng or GLib),
Re:Self Propagating NPM Malware Compromises over 40 Packages
by koakuma-chan on Tuesday September 16, 2025 @03:25PM
(#45266734)
You can add curl to a Rust project too.
Re:Self Propagating NPM Malware Compromises over 40 Packages
by aakkaakk on Tuesday September 16, 2025 @09:01PM
(#45270294)
But why, when reqwest is enough for 99% of cases.
Re:Self Propagating NPM Malware Compromises over 40 Packages
by koakuma-chan on Tuesday September 16, 2025 @09:45PM
(#45270603)
It's bloated.
Re:Self Propagating NPM Malware Compromises over 40 Packages
by WD-42 on Wednesday September 17, 2025 @12:42PM
(#45278194)
It requires Tokio, and believe it or not there are actual cases for non-async rust. So you can't use it in that case.
Re:Self Propagating NPM Malware Compromises over 40 Packages
by bigstrat2003 on Wednesday September 17, 2025 @05:11PM
(#45281451)
Because it requires using async, and for most programs async is not worth the extra effort (plus very heavy dependency in the form of Tokio).