Hacker News new | ask | show | jobs
by jasode 2294 days ago
>, haven't small modules already been at the core of a Unix philosophy?

I assume you're talking about userland programs such as "ls", "cut", "grep", etc. ?[1]

But C Language is also part of UNIX and programmers typically link against a large more comprehensive "standard library" such as glibc:

  libc.a, libc.so  <-- includes printf
... instead linking of a hundred little object files specified explicitly like this:

  printf.o
  strcat.o
  strncat.o
  malloc.o
  leftpad.o
  ... <hundred or thousand more .o files>
What happened with Javascript is the language didn't have a comprehensive "standard library" like C, C++, Java, C#, Python "batteries included", Go, etc. Therefore, NPM became an adhoc "standard library" via bottom-up crowdsourcing. There are both positives and negatives to that approach. One negative is that leftpad() isn't produced by a canonical entity like Netscape or Mozilla but a random programmer. When he wanted to take his ball and go home, he broke everyone's build that depended on it. That type of event didn't happen with "printf()" in the C Language world.

[1] https://en.wikipedia.org/wiki/Unix_philosophy#Do_One_Thing_a...