A Response To “Design Mistakes in Node”

Rich Trott
2 min readJun 12, 2018

--

Photo by holger blank

At the 2018 JSConf EU event, Node.js creator Ryan Dahl presented “Design Mistakes in Node”. It was a sort of listicle of design decisions in Node.js that he regrets.

I am very much involved in the day-to-day development of Node.js core. But I don’t know Ryan, even though I (like everyone else) casually refer to him by his first name. He hasn’t been involved in Node.js core development since 2012. I have been in the same room as him twice (that I know of). I was probably briefly introduced to him on one of those occasions (thanks, Mikeal!). But I have never had a “real” conversation with him. What little I do know of him, I like and admire. But again, I don’t know him.

In the talk, Ryan indicates that he’s not trying to suggest that Node.js should revisit and fix all the things he now regrets. But since that’s what gets asked, that’s the nature of this response.

It does not help that headlines in otherwise-respectable outlets mischaracterize the talk with things like “Node.js Creator Blasts Node.js”. It’s really more like “Node.js Creator Candidly Enumerates Mistakes”. Or “Like Literally Everything Else, Node.js Is Not Perfect”.

So it’s inevitable that I keep coming across this presentation, mostly in the form of what I label “Call for Hot Takes” posts in discussion forums and issue trackers. I keep saying I won’t comment on it, but then I do.

So rather than keep commenting on it, here’s the comment I’ll try to post everywhere.

My responses might neither surprise people involved with the project, nor satisfy the drive-by commenters. Sorry, everyone.

  1. Not sticking with Promises: Too late to go back in time and stick with Promises. But we are introducing them in core APIs. There is an experimental Promises-based API for the fs module and there is one coming for the dns module.
  2. Security: This is a very big issue that I will not try to address completely in a brief Medium article. But I would encourage interested parties to participate in the Node.js Security Working Group.
  3. The Build System (GYP): Yes! Please, someone, open a pull request to get rid of it.

The last four regrets (package.json, node_modules, require("module") without the extension “.js”, and index.js) all get the same response:

These are not going anywhere any time soon, if ever. Trying to “fix” any one of these would come at a huge ecosystem cost that dwarfs the benefit.

So, there you have it. I don’t speak on behalf of the Node.js project or anything, but there’s one person’s opinion.

Now let’s talk about something else. I hear there’s a cool prototype project called deno going around…

--

--