News for hackers. Stuff that matters.
Re:Node.js 16 Available Now by capableweb on Tuesday April 20, 2021 @02:46PM (#26879276)
Never said it should be a third party library, the core team can release libraries as well if they wanted to you know.
Re:Node.js 16 Available Now by hn_throwaway_99 on Tuesday April 20, 2021 @02:55PM (#26879500)
I think what you are arguing (which I agree with) is that the Node ecosystem would benefit from a set of "core" libraries that could just be installed as a separate NPM module, that are blessed by the Node core maintainers, but aren't part of a specific Node version.

Deno basically does this with the Deno standard library, e.g. https://deno.land/[email protected], and I agree that I think it's the right approach.

There is nothing "special" about wrapping setTimeout as a Promise, indeed pretty much everyone has done it at some point, so would be nice if there was a single, blessed standard version that I could just add as @node/standard in my package.json as long as I was on any supported Node version.

Re:Node.js 16 Available Now by throwanem on Tuesday April 20, 2021 @03:33PM (#26880207)
The core team does release a library. It comes with every install, and that's why we call it "standard".
Re:Node.js 16 Available Now by capableweb on Tuesday April 20, 2021 @03:45PM (#26880423)
The original point was that not everyone want all these syntactic sugar "features" shipped with the core runtime...
Re:Node.js 16 Available Now by jakelazaroff on Tuesday April 20, 2021 @03:53PM (#26880552)
What’s the syntactic sugar feature here? Top-level await is part of the language spec.
Re:Node.js 16 Available Now by throwanem on Tuesday April 20, 2021 @04:15PM (#26880945)
One into which you have to opt in, yet.
Re:Node.js 16 Available Now by eyelidlessness on Tuesday April 20, 2021 @04:45PM (#26881400)
I don’t think that’s true. It’s supported in any ESM module, per the ESM standard, without any config or runtime flags. If you mean using ESM to be the opt-in mechanism, that’s not a meaningful distinction. CJS modules and require have always been synchronous and likely always will be. Changing that would break too many things.