The future of Python immutability

Paul Rubin http
Thu Sep 3 18:07:51 EDT 2009


Stefan Behnel <stefan_ml at behnel.de> writes:
> Read again what he wrote. In a language with only immutable data types
> (which doesn't mean that you can't efficiently create modified versions of
> a data container), avoiding race conditions is trivial. The most well known
> example is clearly Erlang. Adding "synchronised" data structures to that
> will not make writing race conditions much easier.

Nonetheless, Erlang is subject to all kinds of traditional threading
problems such as deadlocks.  Haskell's use of software transactional
memory may(?) avoid some of the problems but at a performance cost.



More information about the Python-list mailing list