Show us how you implement this simple and very common concurrent pattern with ClojureScript. I've seen stuff that implement this in ClojureScript and it ain't pretty (to say the least) Impress me! :)
In ES7:
async function fAsync() {
try { var results = await Promise.all([asyncOpA, asyncOpB, asyncOpC]) } catch (e) { ... } }
(go (try (let [ops [asyncOpA asyncOpB asyncOpC]] (core.async/take (count ops) (apply core.async/merge ops))) (catch js/Error e ...)))
Where asyncOp* uses go-catching.
Moreover, it has funcool/cats bindings, so you can use promises in mlet and alet macros if you are into monad thing ;)
Re: cats
Not a big fan of abstractions that don't contribute to code simplicity. What is the percentage of programmer who dig monads? Less than 1% probably.
(go-catching (<? (async-all [asyncOpA asyncOpB asyncOpC])))
And yes, that handles errors exactly like synchronous code does. The total number of lines for implementing go-catching, <? and async-all shouldn't take more than 20-30 loc, if not less.
Now, if 20-30 loc is too much for you to write, then by all means use JS.
(defmacro go-catching [& body] `(go (try ~@body (catch js/Error e# e#))))
(defmacro <? [chan] `(let [res# (<! chan)] (if (instance? js/Error res#) (throw res#) res#)))
Used like this:
(go-catching (<? (async-fn)))