Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Er, C did not invent libraries by any measure whatsoever, and is completely appropriate to call a function available to code without imports “in the standard library”. It is a library function. You did not write it. Simple as that.

This is one of the more unnecessary pedantries I’ve ever seen, and that’s saying something on HN.



I always assumed just from how people used the terms that available without imports = “core language” and available via import without installing external packages = “standard library”


FWIW my intuition is that any functions, classes, constants, whatever - things that I could write myself if I had to - are “standard library”. “Core language” refers to syntactic or semantic features of the language that would require modifying the compiler or interpreter to introduce.


That may indeed be a more useful distinction to draw here. In it, Node could be said to provide a "standard library" (although not actually standardized, and I'm not sure how much it overlaps with eg Deno), while padStart and such would be core language features inasmuch as a compliant JS implementation is guaranteed to include them.

edit: It is not, however, an accurate distinction. https://news.ycombinator.com/item?id=28021135


Even if you call the node built-in libraries 'the standard library' (for node), from context I think it was clear that GGP was referring to the ECMAScript standard library


Pretty sure GGP in your usage here was also me. I was so referring, but had been unaware that ECMA-262 actually defines "standard library" in a way with which my intuitive usage happened to correspond.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: