← Back to context

Comment by ironmagma

3 years ago

Or even just a house or bridge. Completely trivial-seeming things are just very complex.

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.

  • 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.

      4 replies →