Comment

Comment by austin-cheney

Currently, promises are the de-facto way of handling asynchronous tasks in Javascript

Not really. Most of the Node API is still reliant upon callbacks and the frontend absolutely doesn’t care. With one technical exception[1] the use of promises is purely stylistic. As someone old I still prefer callbacks because it’s just functions.

One of the biggest frustrations with JavaScript is people attempting to impose their opinions on you. If you prefer promises then just use promises. The language provides 3 options for asynchronous handling and doesn’t care what path you take.

[1] A promise chain cannot be cancelled or exited early without a throw.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton