[Python-Dev] Sandboxed Threads in Python

Bruce Eckel BruceEckel-Python3234 at mailblocks.com
Sat Oct 8 21:14:25 CEST 2005


> I can (but won't) point out examples for days of bad decisions made for
> the sake of speed, or policy that has been ignored for the sake of speed
> (some of these overlap and some don't).

As long as you've entered premature-optimization land, how about
decisions made because it's *assumed* that (A) We must have speed here
and (B) This will make it happen.

My hope would be that we could find a solution that would by default
keep you out of trouble when writing concurrent programs, but provide
a back door if you wanted to do something special. If you choose to go
in the back door, you have to do it consciously and take
responsibility for the outcome.

With Java, in contrast, as soon as you step into the world of
concurrency (even if you step in by accident, which is not uncommon),
lots of rules change. What was an ordinary method call before is now
something risky that can cause great damage. Should I make this
variable volatile? Is an operation atomic? You have to learn a lot of
things all over again.

I don't want that for Python. I'd like the move into concurrency to be
a gentle slope, not a sudden reality-shift. If a novice decides they
want to try game programming with concurrency, I want there to be
training wheels on by default, so that their first experience will be
a successful one, and they can then start learning more features and
ideas incrementally, without trying a feature and suddenly having the
whole thing get weird and crash down on their heads and cause them to
run screaming away ...

I know there have been some technologies that have already been
mentioned on this list and I hope that we can continue to experiment
with and discuss those and also new ideas until we shake out the
fundamental issues and maybe even come up with a list of possible
solutions.


Bruce Eckel    http://www.BruceEckel.com   mailto:BruceEckel-Python3234 at mailblocks.com
Contains electronic books: "Thinking in Java 3e" & "Thinking in C++ 2e"
Web log: http://www.artima.com/weblogs/index.jsp?blogger=beckel
Subscribe to my newsletter:
http://www.mindview.net/Newsletter
My schedule can be found at:
http://www.mindview.net/Calendar





More information about the Python-Dev mailing list