Comment by krapp
3 years ago
The javascript ecosystem is unnecessarily complex. What would be a single library in any other language (including javascript, prior to NPM) is hundreds of separate single-line modules in JS, each likely with its own bespoke testing framework and toolchain. You have a package to test if a number is even that depends on a package to test if a number is odd that depends on a package to test if a number is an integer that depends on a package to test if a number is a number. And there's probably a whole-ass C compiler in there somewhere because why not?
Whereas any other developer in any other language will just use a modulus and call it a day.
Comparing that to the complexity inherent to an internal combustion engine or a house or a bridge is an insult to engineering.
> You have a package to test if a number is even that depends on a package to test if a number is odd that depends on a package to test if a number is an integer that depends on a package to test if a number is a number.
LOL, perfect summary of the SOTA npm ecosystem.
[dead]
That makes for a great caricature, but React does not depend on `is-even`. As for the small modules, this is just the Unix philosophy lived out, "do one thing well," which is ironically what a lot of hardcore systems people used to preach.
Doing one thing well doesn't require doing only one thing per library, you won't find any C code that takes the Unix philosophy to such an extreme. And one could easily argue the excessive granularity of packages in JS causes it to do a lot of things badly.
> you won't find any C code that takes the Unix philosophy to such an extreme
Challenge accepted: https://github.com/coreutils/coreutils/blob/master/src/true.... [1]
> one could easily argue the excessive granularity of packages in JS causes it to do a lot of things badly
Yes, easily. The same argument can be extended, and even by the same virtue, to Bash programs and the Unix stack.
[1] See also: http://trillian.mit.edu/~jc/humor/ATT_Copyright_true.html
3 replies →