This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-22
Channels
- # announcements (9)
- # asami (52)
- # aws (1)
- # babashka (7)
- # babashka-sci-dev (12)
- # beginners (72)
- # calva (24)
- # cider (9)
- # clj-kondo (76)
- # cljs-dev (15)
- # clojure (19)
- # clojure-australia (4)
- # clojure-europe (33)
- # clojure-france (9)
- # clojure-gamedev (17)
- # clojure-nl (6)
- # clojure-portugal (5)
- # clojure-uk (5)
- # clojurescript (61)
- # clojureverse-ops (4)
- # code-reviews (23)
- # conjure (1)
- # data-science (2)
- # datalevin (6)
- # datomic (49)
- # gratitude (1)
- # helix (24)
- # holy-lambda (14)
- # jobs (3)
- # lsp (92)
- # malli (7)
- # missionary (8)
- # pathom (12)
- # proletarian (3)
- # re-frame (4)
- # remote-jobs (1)
- # shadow-cljs (4)
- # spacemacs (3)
- # sql (9)
- # tools-build (90)
- # vim (1)
- # xtdb (11)
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/