logoalt Hacker News

AmbroseBiercetoday at 8:53 AM5 repliesview on HN

Microsoft should just bite the bullet and make a huge JS standard library and then send GitHub notifications to all the project maintainers who are using anything that could be replaced by something from there suggesting them to do such replacement. This would likely significantly reduce the number of supply chain attacks on the npm ecosystem.


Replies

dominicrosetoday at 9:57 AM

JS also has a stability issue. The language evolved fast, the tools and the number of tools evolved fast and in different directions. The module system is a mess and trying to make it better caused more mess. There's Node.js, TypeScript and the browser. That's a lot to handle when trying to make something "std".

Meanwhile I have been using Ruby for 15 years and it has evolved in a stable way without breaking everything and without having to rewrite tons of libraries. It's not as powerful in terms of performance and I/O, it's not as far-reaching as JS is because it doesn't support the browser, it doesn't have a typescript equivalent, but it's mature and stable and its power is that it's human-friendly.

bakkotingtoday at 6:15 PM

If you look at the list of compromised packages, very few of them could reasonably be included in a standard library. It's mostly project-specific stuff like `@asyncapi/specs` or `@zapier/zapier-sdk`. The most popular generic one I see is `get-them-args`, which is a CLI argument parser - which is something Node has in the form of `util.parseArgs` since v16.17.0.

testdelacc1today at 9:22 AM

This is harder than it sounds. Look at the amount of effort it took to standardise temporal (new time library) and then for all the runtimes to implement it. It’s a lot of work.

And what’s more, people have proposed a standard library through tc39 without success - https://github.com/tc39/proposal-built-in-modules

Of course any large company could create a massive standard library on their own without going through the standards process but it might not be adopted by developers.

nottorptoday at 9:26 AM

There's an xckd for that :)

The one with 12 competing standards going to 13 competing standards, or something like that.

show 2 replies
h4ck_th3_pl4n3ttoday at 10:09 AM

That is literally how the CycloneDX SBOM packages work, well, after the fact and after the disclosure process.