← Back to context

Comment by ironmagma

3 years ago

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

    • Bash is barely even a language. No one (sane) is writing an entire application in it. And no one (sane) is writing an OS kernel in Javascript. The context in which a language is run and the kinds of programs written with it matter. You can't compare Javascript to C or Bash or anything running close to the metal, a better comparison would be to Python or Lua - other high level dynamic languages.

      There is no technical reason why Javascript packages need to be as small as they are. The strongest argument for it would be that smaller packages travel faster over the wire, and save bandwidth, but that doesn't apply when hundreds or thousands of dependencies are involved. Which is why everyone just uses webpack. And yet the web is still bloated to the point of morbidity. So what even is the point?

      2 replies →