3 ms·
Citation please? Clojure has some awesome libraries, but unless you can show some use cases where futures/promises and core.async make it possible (or even jus
by profquail 13y ago
Citation please?
Clojure has some awesome libraries, but unless you can show some use cases where futures/promises and core.async make it possible (or even just easier) to implement functionality compared to async/await (or F# async) I'm not inclined to take your word for it.
- profquail 13y agoReplying to myself, since I can't edit my post anymore -- Futures and promises aren't unique to Clojure. For example, AliceML had them ages ago. After thinking it over, I'm going try implementing them for my ExtCore library for F# (https://github.com/jack-pappas/ExtCore https://github.com/jack-pappas/ExtCore). Thanks to the GP for the idea.
- _halgari 13y agoCSP gives you everything async/await gives you, plus more. Channels can act as throw away promises, or as continual streams of events. Add to that the power of alt! (http://clojure.github.io/core.async/#clojure.core.async/alt! http://clojure.github.io/core.async/#clojure.core.async/alt!) and you got some very powerful primitives. There's nothing about async/await that's really new. You can implement these on top of yield (C#/Python), or with any language that supports the pausing and resuming of execution. In Clojure CSP is implemented as a library (core.async), no changes to the compiler needed. Now that's power. (disclosure, I helped write core.async)
- profquail 13y agoI agree, async is much more flexible and powerful when it's a library feature (as it is in F#) as opposed to being a built-in language feature (as it is in C# 5). core.async looks very well-rounded, congratulations on a fine job.
- esailija 13y agoasync/await is just a generator function that yields promises. It is implementable even in node.js if you enable --generators flag.