ClojureScript Gets Async/Await

· coding · Source ↗

ClojureScript 1.12.145 ships native ^:async / await syntax, targeting ECMAScript 2016, eliminating third-party dependencies for async interop with modern Browser APIs and popular libraries.

What Matters

  • Annotate any defn with ^:async; compiler emits a JavaScript async function with await usable inline inside let bindings.
  • ^:async works inside deftest blocks, enabling async test assertions with await directly.
  • Async support topped the last Clojure community survey as the most-wanted ClojureScript JS-interop enhancement.
  • Contributor Michiel Borkent is credited in the release; full changelog linked from the release post.
  • [HN: @midnight_eclair] ClojureScript had CSP-style async via core.async before JS itself had async/await; macros filled the gap for over a decade.
  • [HN: @ertucetin] Lisp macro system let devs ship their own async/await macros without waiting for an official release; 1.12.145 replaces those custom solutions.
  • [HN: @slifin] Clojure AI agents pairing with REPL interaction reportedly outperform typed-language setups; REPL feedback loop speeds agentic coding cycles.

Original | Discuss on HN