Learning Erlang: non mutable state

21 May 2007 7:05 - (0) comments

Erlang is a functional programming language with non-mutable state. This absence of side effects simplifies running programs in threads.

From Programming Erlang:

If you use a conventional programming language like C or Java to program a multicore CPU then you will have to contend with the problem of “shared memory.” In order not to corrupt shared memory the memory has to be locked while it is accessed. Programs that access shared memory must not crash while they are manipulating the shared memory. In Erlang, there is no mutable state, there is no shared memory and there are no locks. This makes it easy to parallelize our programs.

Comments

No comments allowed.

Admin