I find auto-concurrency in clojure to be misleadingly thrown around as
free. I think a good description of what is free would be helpful, and
examples of concurrency patterns that are still necessary above
clojure data structures.

A common example from my work is a screen that will need to display a
snapshot of data when opened and insert new data at the top on new
events. It's not acceptable to publish the same data twice or never,
it must be an immediately consistent view at all times. I've found
ways to do this with both agents (when some latency is acceptable) and
single threading the storing and publishing logic. I've also solved
this problem by always sending full snapshots of the data and removing
the data that's already known to be on the screen.

None of these solutions felt elegant.

Sent from my iPhone

On Aug 2, 2012, at 2:53 AM, Christian Sperandio
<christian.speran...@gmail.com> wrote:

> Hi,
>
> I don't like the term auto-concurrency  because auto-concurrency
> doesn't exist. The immutability make easier the concurrency
> programming  because you don't have to manage the shared data but, you
> always have the synchronising management and write specific code for
> concurrency (using pmap, futures, promises and so on).
>
> About the types of concurrency, I think you should talk about ref and
> agent. Refs for their transactions management and agents because for
> people coming from OOP, They remember them things like actor pattern.
>
> Good luck for your book.
>
>
> Christian
>
> Le 2 août 2012 à 02:29, Brian Marick <mar...@exampler.com> a écrit :
>
>> I'm writing a book on /Functional Programming for the Object-Oriented 
>> Programmer/. <https://leanpub.com/fp-oo> It uses Clojure as the teaching 
>> language.
>>
>> Since one of the things that attracts programmers to FP is the hope that 
>> ordinary mortals can write multicore programs, I want to have a chapter on 
>> concurrency. Of the various types of concurrency Clojure offers, which do 
>> you think would be most useful to explain? My inclination is: 
>> auto-concurrency due to immutability, futures (I love futures), and atoms. 
>> What do you think would be the right set?
>>
>> -----
>> Brian Marick, Artisanal Labrador
>> Contract programming in Ruby and Clojure
>> Occasional consulting on Agile
>>
>>
>> --
>> 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 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 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

Reply via email to