1. 11

  2. 2

    If you cut out the falsehoods and breathless assertions this reads like an advertisement for Deno.

    The fundamental mistake of Node.js was diverging from the browser as new APIs were standardized, inventing too much. In 2010, we didn’t have ES modules, but once it was standardized it should have been brought into Node.

    Why? CommonJS was already a de facto standard; ESM is promoted to replace it, but offers no benefits and several drawbacks. It solves no problems that Node has.

    The same can be said for promises, async/await, fetch, streams, and more.

    Node has had promises for as long as Javascript has. It added async/await support in the same year it entered the Ecmascript standard. Fetch is a nice abstraction for making XHR calls in a browser, but it’s designed for the browser, not a server. Node’s had streams for ages, before version 0.10 when I started using it.

    Antiquated non-standard bits like CommonJS require, package.json, node_modules, NPM, the global process object will ultimately either be standardized and added to the browser or supplanted by web-aligned replacements.

    What would it even mean for NPM to be a browser standard? What qualifies these things as antiquated? Is it because they are supplanted by the latest VC-backed hype cycle?