Re:Clojure Async Flow Guide
by kasajian on Sunday August 17, 2025 @11:33PM
(#44937133)
Funny. I was just thinking about dismissing Clojure for a project I'm going to work on because I was concerned about it's lack of ability to work with async calls. I'm too used to how async in JavaScript and C#, and I'm not sure I'd want to work in an environment that doesn't have a simple way to structure async calls. It doesn't necessarily have to be async / await. Just some attention to the issue rather than completely ignoring it.
[ Parent
| on HN ]
That has always been one of Clojure's main strengths (async & concurrency). With the new JVM VirtualThreads, things are looking better than ever.
The transition of core.async specifically to VirtualThreads is still WIP as far as I understand, but with minimal tweaks, 90% of the benefits are already there, even with the current latest version.
Re:Clojure Async Flow Guide
by puredanger on Monday August 18, 2025 @07:52AM
(#44939621)
Virtual thread support in core.async is imminent, should land any day now.
woot
Async/await for Clojure: https://github.com/xadecimal/async-style
You can get basically all variations of async coding with Clojure a la carte.
Re:Clojure Async Flow Guide
by mechanicum on Monday August 18, 2025 @07:27AM
(#44939454)
I’m curious what led to that conclusion. As far as I remember, making concurrency easier to manage was always presented as one of Clojure’s primary objectives. It’s fundamental to the design e.g. a major motivation for all core data structures being immutable.
STM, atoms and agents were there from the beginning. I think futures and promises were added in 1.1. core.async is from 2013. Even popular third-party libraries like promesa and manifold are around 10 years old at this point.
I think flow promises to make it easier to orchestrate core.async, specifically, in complex applications, but the essential primitives are far from new and I don’t consider them any harder to use than JavaScript.