Hacker News new | ask | show | jobs
by monlockandkey 891 days ago
The solution to the poor standard library in my opinion is for someone like NPM to step up and provide the defacto language library. It will help in reducing the sheer volume of JavaScript dependencies to only one library.
1 comments

It's pretty common for embedded languages to not include big batteries included standard libraries. And at its core, JS is designed and optimized as an embedded language (to extend the functionality of a browser). That's why on the frontend the "standard library" are the DOM and window APIs provided by the browser.

The idea that it needs a better standard library is deeply tied to the idea that it should be used as an applications language, but that's actually kind of a recent idea with the advent of runtimes like Node and later Deno and Bun. And all of these do include bigger standard libraries.

I think part of the reason JS has become so popular as both an embedded and application language is that it doesn't have a standard library that needs to be shipped to all embedders/implementations. That's what Java does. And Java lost a lot of ground to JS over the years.

The reason why Javascript became popular is because it has been the only 'application' language available in all the browsers.
Java, Silverlight and Flash disagree that JS was the only language available in browsers.
But only Javascript was embedded right into the browser and that is why it was extremely difficult to kill it unlike all the other technologies available as add-ons.