Live data from Hacker News

ClojureScript Gets Async/Await

clojurescript.org

1–10 of 76 posts

Re: ClojureScript Gets Async/Await

#2
fun fact: clojurescript had support for asynchronous paradigm through core.async library (CSP style) long before async/await landed in javascript itself.

edit: i'm in no way trying to diminish the value of this release, just pointing out how cool it is that you can get new language features before they are available in the host language by just adding a library to your dependencies. clojure is awesome!

Re: ClojureScript Gets Async/Await

#4

fun fact: clojurescript had support for asynchronous paradigm through core.async library (CSP style) long before async/await landed in javascript itself. edit: i'm in no way trying to diminish the value of this release, just pointing out how cool it is that you can get new language features before they are available in the host language by just adding a library to your dependencies. clojure is awesome!

True, but there are many reasons to avoid core.async, especially in 2026.

It balloons up the Js artifact, has no inherent error model, and transforms into state machine code that's hard to read/debug if something goes wrong. Plus, the `go` macro encourages overly-large functions, because it can't transform code outside its own sexpr.

As one Cognitect put it, "core.async is beautiful nonsense".

Re: ClojureScript Gets Async/Await

#5
post #4

fun fact: clojurescript had support for asynchronous paradigm through core.async library (CSP style) long before async/await landed in javascript itself. edit: i'm in no way trying to diminish the value of this release, just pointing out how cool it is that you can get new language features before they are available in the host language by just adding a library to your dependencies. clojure is awesome!

True, but there are many reasons to avoid core.async, especially in 2026. It balloons up the Js artifact, has no inherent error model, and transforms into state machine code that's hard to read/debug if something goes wrong. Plus, the `go` macro encourages overly-large functions, because it can't transform code outside its own sexpr. As one Cognitect put it, "core.async is beautiful nonsense".

And here I thought I was too dumb to grok core.async all those years ago (ps I still am)

Re: ClojureScript Gets Async/Await

#6
I wish an alternative to JS for the front end would catch on and be something more than obscure... I'd love to use something like clojurescript, but I struggle to imagine doing so for anything but a personal side project :/ Maybe this is easier to adopt if you're already a clojure shop for the backend?

Re: ClojureScript Gets Async/Await

#8
post #7

Seems like wrapping async await functions with CSP was a better way to handle this . Clojure already had a nicer pattern for this

this release is about exposing the host language primitives to clojurescript

core.async isn't going anywhere, if async/await works better than promise based implementation, core.async will get an update in it's .cljs parts

Re: ClojureScript Gets Async/Await

#9
post #6

I wish an alternative to JS for the front end would catch on and be something more than obscure... I'd love to use something like clojurescript, but I struggle to imagine doing so for anything but a personal side project :/ Maybe this is easier to adopt if you're already a clojure shop for the backend?

You should try Gleam. I'm using it in production to great delight:

https://blisswriter.app/

https://blog.nestful.app/p/how-we-dropped-vue-for-gleam-and

Re: ClojureScript Gets Async/Await

#10
post #6

I wish an alternative to JS for the front end would catch on and be something more than obscure... I'd love to use something like clojurescript, but I struggle to imagine doing so for anything but a personal side project :/ Maybe this is easier to adopt if you're already a clojure shop for the backend?

Don't be afraid, it's great! I certainly wouldn't call it "obscure", I've been using it for 10 years now to compile a complex app into highly-optimized client-side code. And the community is very welcoming and mature.
Post reply on HN