This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-22
Channels
personally, with promesa existing i don’t see that much utility in direct async/await (async generators are a weird one though)
yeah, and the p/let macro is something you could write with about 10 lines yourself:
(defmacro plet
[bindings & body]
(let [binding-pairs (reverse (partition 2 bindings))
body (cons 'do body)]
(reduce (fn [body [sym expr]]
(let [expr (list '.resolve 'js/Promise expr)]
(list '.then expr (list 'clojure.core/fn (vector sym)
body))))
body
binding-pairs)))
Also a not insignificant fraction of cljs devs are on reframe, which has it's own async issues but is definitely outside the realm of async/await in domain code
but in the end the expression semantics is enough to just throw the idea out the window - and never consider again
I suppose if you converted the CLJS to SSA form only in the presence of JS async
this could work - but already the scope of this is far beyond
yeah i think the thing that would significantly change the calculus is https://github.com/tc39/proposal-do-expressions/