ClojureScript Gets Async/Await
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
defnwith^:async; compiler emits a JavaScript async function withawaitusable inline insideletbindings. -
^:asyncworks insidedeftestblocks, enabling async test assertions withawaitdirectly. - 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.asyncbefore 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.