News for hackers. Stuff that matters.
Re:“Node.js is one of the worst things to happen to the soft... by abritinthebay on Tuesday November 21, 2017 @11:43AM (#15749167)
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

There are no comments on this comment yet.