[erlang-questions] Best actor libraries in other languages?
Tue Feb 12 00:24:59 CET 2013
> The Haskell community seems to prefer STM over actors. How does the Erlang
> community feel about STM?
I'm not the Erlang community, but I hope I'm part of it.
There is a very good thing about Transactional Memory
and two rather bad things.
+ The very good thing is that it composes.
- One bad thing is that when contention is high it can thrash.
- Another is that it encourages you to keep thinking imperatively.
There is a very special thing about TM in Haskell, which is that
it encourages you to keep the number of mutable variables small.
Quoting "Real World Haskell":
Even in a concurrent program, we strive to keep as much of
our code as possible purely functional. This makes our code
easier both to reason about and to test. It also gives the
underlying STM engine less work to do, since the data
involved is not transactional.
This makes TM programming in Haskell very different from TM
programming in Java.
Actors fit distribution rather better than TM does, and
Erlang comes from a distributed programming context, while
Haskell has historically been more concerned with single
More information about the erlang-questions