What Async Promised and What It Delivered

· Source ↗

TLDR

  • Async/await is a layered saga where each abstraction fixes the previous one’s failure mode, without fully escaping the underlying tradeoffs.

Key Takeaways

  • The async/await model in most languages traces back to JavaScript’s lack of threads and its event-driven DOM model.
  • Each layer (callbacks, promises, async/await) addressed readability or error-handling problems introduced by the previous layer.
  • Unhandled promise rejections created a new class of silent failures that callbacks never had; Node.js eventually made them fatal.
  • The article frames async/await as an ongoing story, not a solved problem, with effect systems as a plausible next chapter.

Hacker News Comment Review

  • Sharp divide on whether async/await belongs outside JavaScript: one camp sees it as a JS-specific hack ported to languages that already had threads and didn’t need it; the other values the IO-labeling discipline it enforces.
  • Commenters note that function coloring, deadlocks, and silent exception swallowing are not unique to async/await – earlier callback and threading models carry the same failure modes in different forms.
  • Zig’s vtable-based effect system surfaced as a forward-looking alternative, with the caveat that it needs aggressive compiler optimization to avoid real runtime dispatch overhead.

Notable Comments

  • @wesselbindt: Reframes function coloring as useful IO labeling: “labelling my functions with some useful information… I happen to care about whether my functions do IO or not.”
  • @paulddraper: Notes unhandled rejection silent failures exist in Java too, not just JS/Node.
  • @cdaringe: Predicts the article’s conclusion lands on effect systems by the final section.

Original | Discuss on HN