> For example, what if I have a hash-map that needs to handle concurrent
> changes to the data structure, but never needs to have concurrent
> changes to a given piece of data (i.e a key/value pair). Wouldn't
> there be value in being able to modify the data "in-place" without
> making a copy, or needing to endure the overhead associated with STM?

Hi Trevor, 

You should endure the overhead of the STM if you need what the STM provides: 
coordination of activity across identities. But there are several things in 
Clojure that provide identities without STM.  In your example, you could place 
a map inside an atom, which provides atomic transitions between values, but no 
coordination.

Abandoning values entirely should be highly motivated by a specific need. If 
you're there, then Java's concurrent maps are good and appropriate.

Stuart Halloway
Clojure/core
http://clojure.com

-- 
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