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.


Reply via email to