Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The main argument is that "of all the ways of doing concurrency, callbacks are by far the worst". I tend to agree.

Now we have async/await, I think there is no problem.



But it's funny, isn't it?

Callbacks were advertised as the reason why one should use node. They're a foundation of JS.

Then they got covered up by promises. And now, with async await, we're back full circle towards the style of a more linear programming language such as python.


Nobody loved node because of callbacks. Node was the only ecosystem where everything was written with concurrency in mind.


> Node was the only ecosystem where everything was written with concurrency in mind.

Yes, sure, if you ignore all the other programming languages, like Erlang, which is older even than first hacked versions of JavaScript.


JS was drafted in a week.

Node is a band aid on top of a tech stack that webdev is stuck with.

Node was done with concurrency in mind, JS wasn't.

Compare apples to apples:

How does Erlang's ecosystem stack up when it comes to concurrency? How does it compare to Node? Do you even care given your prejudices regarding JS?


It wasn’t that callbacks we’re a selling point, it’s that asynchronous execution was.

Callback were just the way of doing that in JS. Now we have Promises + Async/Await as sugar around what is basically the same pattern

ie - cb(err, result) is not that different than .catch(err).then(result) but it’s much nicer to develop with.

Of course now you can do the same in imperative try/catch for with await so yes, we’re back to similar syntax but a whole lot change under the hood and provided a much more performant concurrent model


> Callbacks were advertised as the reason why one should use node. They're a foundation of JS.

Where can I see that advertisement?

I'm pretty sure that the main selling point of Node.js is and always has been that you can easily share code with the browser.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: