The future of Python immutability

John Nagle nagle at
Tue Sep 8 19:45:46 CEST 2009

Steven D'Aprano wrote:
> On Tue, 08 Sep 2009 09:38:51 +0200, Hendrik van Rooyen wrote:
>> On Monday 07 September 2009 20:26:02 John Nagle wrote:
>>>     Right.  Tracking mutablity and ownership all the way down without
>>> making the language either restrictive or slow is tough.
>>>     In multi-thread programs, though, somebody has to be clear on who
>>>     owns
>>> what.  I'm trying to figure out a way for the language, rather than the
>>> programmer, to do that job.  It's a major source of trouble in threaded
>>> programs.
>> I think that trying to make the language instead of the programmer
>> responsible for this is a ball-buster.  It is unlikely to be either easy
>> or cheap. I would rather have the programmer responsible for the mental
>> model, and give her the tools to do the job with.
> That was the situation 20 years ago with memory management. 

     Good point.

     The other big point is the CPython deals with concurrency by
preventing it.  This is killing performance on multi-core CPUs.
Read "", which demonstrates
just how awful the current GIL implementation is.  Adding more
CPUs slows CPython down.

				John Nagle

More information about the Python-list mailing list