[Python-ideas] Fwd: Concurrent safety?
Terry Reedy
tjreedy at udel.edu
Thu Nov 3 00:25:05 CET 2011
On 11/2/2011 1:53 AM, Mike Meyer wrote:
> On Wed, 02 Nov 2011 10:45:42 +0900
> "Stephen J. Turnbull"<stephen at xemacs.org> wrote:
>> But this is revealing: you say *your* goal is making *me* think.
>
> Only if I may wind up maintaining the code you wrote. But that's a
> driving factor in a *lot* of the design decisions when it comes to
> extending python.
>
>> That's what I consider un-Pythonic.
>
> I feel just the opposite. Python doesn't allow errors to silently
> pass, or guess what the programmer wanted to do, or make inferences
> about things - it raises exceptions.
It is true that Python actually does a lot to protects programmers (from
their own ignorance and foolishness -- but with ctypes wiping out all
protections ;-). One easily overloop example is the impossibility by
design of buffer over-runs, a common security problem. But it does so
without feeling like a straightjacket.
Breaking a large fraction of existing code is too much of a sledgehammer
approach. If Python had been designed from the beginning for
multi-threading as the default, with single-threading as the exception,
the case would be different. But even now, many are happy with single
thread in multiple processes or multiple task objects within a single
thread for concurrency. So burdening single thread code will not be popular.
--
Terry Jan Reedy
More information about the Python-ideas
mailing list