HN
Today

ClojureScript Gets Async/Await

ClojureScript's latest release, 1.12.145, finally brings native async/await support, a feature long-desired by its community. By compiling ^:async hinted functions directly to JavaScript async functions, it drastically simplifies interop with modern browser APIs and libraries. This highly anticipated addition streamlines asynchronous programming, making ClojureScript development more efficient and less dependent on external libraries.

16
Score
2
Comments
#5
Highest Rank
4h
on Front Page
First Seen
May 8, 8:00 AM
Last Seen
May 8, 11:00 AM
Rank Over Time
11556

The Lowdown

The ClojureScript team has announced release 1.12.145, bringing a significant enhancement to the language: native support for async/await. This update is poised to improve developer experience significantly, particularly for those interacting with modern JavaScript ecosystems.

  • ClojureScript now targets ECMAScript 2016, enabling a careful selection of new interop features.
  • By tagging a function with ^:async, the ClojureScript compiler will now emit a native JavaScript async function.
  • The release provides clear examples of how to use await within these new async functions and demonstrates their integration into testing frameworks.
  • This functionality was the most requested enhancement for JavaScript interop in the last Clojure survey.
  • It aims to eliminate the need for additional dependencies when dealing with common asynchronous patterns in modern browser APIs and popular JavaScript libraries.

This release marks a substantial step forward for ClojureScript, aligning it more closely with contemporary JavaScript development practices and addressing a major pain point for its users.