3 ms·
What's wrong with this place that that gets downvoted to 0? Have people actually looked at books on scala or clojure, or the respective websites? Odersky's "P
by rbarooah 16y ago
What's wrong with this place that that gets downvoted to 0?
Have people actually looked at books on scala or clojure, or the respective websites?
Odersky's "Programming Scala" a whole chapter on actors entitled "Actors and Concurrency", which leads with an introduction about the problems with threads and how Actors provide a solution. There's no mention of STM. STM is not in the scala standard library and is an experimental feature right now. It would be unreasonable for someone evaluating the language today to regard STM as an available solution for concurrency, and if you follow Martin Odersky's advice, you'd use Actors.
All of the major clojure books, on the other hand, devote their concurrency chapters to STM and Clojures's concurrency primitives that are designed to work with it, and Rich Hickey is pretty clear that this is the way to go.
I think it's reasonable to compare the two approaches since they are the native idiomatic way in each language. The very fact that STM is coming soon to Scala suggests that Actors may not be enough. Don't people want to see the two compared?
It is notable that both languages are flexible enough that STM or Actors can be implemented as libraries.