[Python-ideas] Python 3000 TIOBE -3%

Matt Joiner anacrolix at gmail.com
Sat Feb 11 03:24:30 CET 2012

Threading is a tool (the most popular, and most flexible tool) for
concurrency and parallelism. Compared to forking, multiprocessing, shared
memory, mmap, and dozens of other auxiliary OS concepts it's also the
easiest. Not all problems are clearly chunkable or fit some alternative
parallelism pattern. Threading is arguably the cheapest method for
parallelism, as we've heard throughout this thread.

Just because it can be dangerous is no reason to discourage it. Many
alternatives are equally as dangerous, more difficult and less portable.

Python is a very popular language.someone mentioned earlier that popularity
shouldn't be an argument for features but here it's fair ground. If Python
3 had unrestrained threading, this transition plunge would not be
happening. People would be flocking to it for their free lunches.
Unrestrained single process parallelism is the #1 reason not to choose
Python for a future project. Note that certain fields use alternative
parallelism like MPI, and whoopee for them, these aren't applicable to
general programming. Nor is the old argument "write a C extension".

Except for old stooges who can't let go of curly braces, most people agree
Python is the best mainstream language, but the implementation is holding
it back. The GIL has to go if CPython is to remain viable in the future for
non-trivial applications. The current transition is like VB when .NET came
out: everyone switched to C# rather than upgrade to VB.NET, because it was
wiser to switch to the better language than to pay the high upgrade cost.

Unfortunately the Python 3 ship has sailed, and presumably the GIL has to
remain until 4.x at the least. Given this, it seems there is some wisdom in
the current head-in-the-sand advice: It's too hard to remove the GIL so
just use some other mechanism if you want parallelism, but it's misleading
to suggest they're superior as described above. So with that in mind, can
the following changes occur in Python 3 without breaking spec?

- Replace the ref-counting with another GC?
- Remove the GIL?

If not, should these be relegated to Python 4 and alternate implementation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120211/15a2bfdd/attachment.html>

More information about the Python-ideas mailing list