[erlang-questions] Erlang and mutable state

Bob Ippolito <>
Fri Nov 16 23:04:24 CET 2007


Erlang style pattern matching and mutable variables are sorta mutually
exclusive. There is mutable state in the process dictionary though,
see erlang:get, erlang:set. There's also ets. You can also of course
emulate mutable state by encapsulating the state in another process.

On 11/16/07, istarex <> wrote:
> Hi all,
>
> I had a question about Erlang and mutable state.  I understand that
> Erlang avoids the concurrency nightmare of other languages by avoiding
> mutable state shared between processes.  But why Erlang doesn't allow
> mutable state isolated within a process (such that no other process
> could directly access or change that state)?  I'm wondering what in
> Erlang's programming model prevents this.  If anybody could point me
> to a good link or paper that describes the reason, I'd really
> appreciate it.
>
> -Istarex
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list