Top
Best
New

Posted by zdw 4 days ago

What async promised and what it delivered(causality.blog)
198 points | 217 commentspage 4
coolThingsFirst 8 hours ago|
Promised delivered exactly what it it.
threethirtytwo 11 hours ago||
This was a hardware and os level problem first. All of that had to be solved before higher level abstractions through languages like go JavaScript could tackle it. Author skipped this entirely.
worik 8 hours ago||
I would point out two other short Cummings in the async/await paradigm

1. It makes asynchronous programming look synchronous. I do not like things being other than they appear. The point was touched on with the:

        getOrders(user.id),
        getRecommendations(user.id)
example, but it is a serious thing when the v mental model is wrong

2. On a related issue CPU bound code can block the thread of execution and stop any concurrency in its tracks

In Rust there is the added problem of shoehorning it into the memory model which has lead to a lot of hairy code and tortured paradigms (e.g. pin)

littlestymaar 3 days ago||
Because all HN needed was another piece of AI slop incorrectly quoting “what color is your function”…

It's 2026 and I'm starting to hate the internet.

twoodfin 5 hours ago|
And it even got re-upped on the second-chance queue despite plenty of engagement a few days ago!
worik 8 hours ago||
There is a small "straw man" bias here. Callbacks are not the only alternative to Promises. There exist state machines and event loops too.

I play around with real time audio, and use state machine/event loop. A very powerful, if verbose, method to do real-time programming, I cannot see how asyc/await could achieve the same ends

teaearlgraycold 11 hours ago||
Not a fan of async in other languages (I avoid it in rust and python like the plague), but it feels like a straight upgrade in JS. I’ve never once regretted its addition. In my experience it’s extremely rare for things to get more complicated than an await followed by a Promise.all(). Unhandled rejections are super obvious to a human as performing a .then() chain is uncommon in the days of await. And linters will pick it up if you miss it. Function coloring isn’t an issue as all of the Node stdlib that I’ve seen provides async functionality (back in the day you could accidentally call a synchronous file system operation and break the event loop). You end up with everything returning a promise except for some business logic at the leafs of the dependency graph. A Node app is mostly i/o anyway, thus the functions mostly return Promises. The await keyword is homomorphic across promises and other values. And type checking (who isn’t using typescript?) will catch most API changes where something becomes async. I can’t say it’s perfect, but it’s really not a problem for me.
jdw64 11 hours ago||
[dead]
edmondx 3 days ago||
[dead]
holybbbb 11 hours ago|
No mention of Novell Netware. This was a solved problem decades ago and Windows had it for almost as long.

The next decade will be a proliferation of hackers having fun with io_uring coming up with all sorts of patterns.