Ben, you make a good point. I guess I was stating was something more along the lines of the following. We have really really good concurrency primitives (atom, ref, agent) and I think it would be a mistake to reach for channels when one of those would do.
core.async is pretty fast, but reducers will probably work faster for normal map/reduce needs. You can write something like an agent using channels, but it won't be as fast as Clojure's agents. So I should have stated this much clearer "to focus a system purely on core.async would be to ignore the other features of Clojure. Use core.async when other core language features won't work" Timothy On Mon, Jul 1, 2013 at 9:27 AM, Ben Wolfson <wolf...@gmail.com> wrote: > On Mon, Jul 1, 2013 at 7:10 AM, Timothy Baldridge <tbaldri...@gmail.com>wrote: > >> It's my opinion that core.async shouldn't be used a concurrency >> mechanism, or as a new programming paradigm. Instead, it should be used as >> a communication method between sequential processes, and as a de-coupling >> method between modules. Let's go back to Rich's original post on the >> library: >> >> "There comes a time in all good programs when components or subsystems >> must stop communicating directly with one another. This is often achieved >> via the introduction of queues between the producers of data and the >> consumers/processors of that data." >> > > Well, if you're looking for guidance as to how the library should be used > by reading tea leaves in a blog post introducing them, compare: > > "Note that, unlike other Clojure concurrency constructs, channels, like > all communications, are subject to deadlocks, the simplest being waiting > for a message that will never arrive, which must be dealt with manually via > timeouts etc." > > "Unlike other ... concurrency constructs" == "this is also a concurrency > construct". It's possible, I suppose, to maintain that it's a concurrency > construct that shouldn't be used for concurrency-in-general, but that > strikes me as a losing proposition; it *is* a concurrency construct, and > nothing about the library itself requires that it be used the way you're > suggesting. (It would be nice if there were some guarantee of linearity > for channels so that I don't try to pass one to e.g. take-while and then > also try to read from it elsewhere, but that's not directly related.) Also, > if---as the references to go and Erlang suggest---it will be possible to > have hundreds of thousands of go blocks talking over channels to each > other, performance considerations seem pretty reasonable. > > -- > Ben Wolfson > "Human kind has used its intelligence to vary the flavour of drinks, which > may be sweet, aromatic, fermented or spirit-based. ... Family and social > life also offer numerous other occasions to consume drinks for pleasure." > [Larousse, "Drink" entry] > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.