Re:Why Threads are a Bad Idea (for most purposes) (1995) [pdf]
by chrisseaton on Wednesday June 14, 2017 @02:22AM
(#14550960)
That's not quite what I mean.
I mean an Erlang actor is a state machine isn't it? It accepts messages, and each messages causes the actor to either return some data based on its state, or to enter a new state.
State machine - so it's holding state isn't it? And it's mutable because you can cause it to enter a new state by sending messages.
And you have lots of these mutable state machines in your Erlang process - lots of mutable state.
See what I mean? I know they don't have shared memory, but each process is effectively a little piece of global shared mutable state. And that's bad!
In other parallelism models like fork-join, there is no mutable state. Tasks get input parameters, and produce a result. They don't have any state in any meaningful sense because you can't observe their state externally and you can't ask them to change state externally.
I mean an Erlang actor is a state machine isn't it? It accepts messages, and each messages causes the actor to either return some data based on its state, or to enter a new state.
State machine - so it's holding state isn't it? And it's mutable because you can cause it to enter a new state by sending messages.
And you have lots of these mutable state machines in your Erlang process - lots of mutable state.
See what I mean? I know they don't have shared memory, but each process is effectively a little piece of global shared mutable state. And that's bad!
In other parallelism models like fork-join, there is no mutable state. Tasks get input parameters, and produce a result. They don't have any state in any meaningful sense because you can't observe their state externally and you can't ask them to change state externally.