"Guido has a cow". Hmmm, or maybe he knows this would be mean huge, backwards-incompatible changes to the language's dynamic nature, and especially after the experience with the changes (I think much lesser ones compared to this) from Python 2 to Python 3, he's very wary of that.
Still, if you were going to propose "a few restrictions on the language" to make it less dynamic and easier to do multi-threading / optimization, what would they look like?
Re:Progress on the Gilectomy
by VectorLock on Friday June 02, 2017 @10:20AM
(#14470071)
From seeing the "Status of the Gilectomy" talk at PyCon it sounded more like the big blocker is not breaking the C API too bad. Now if somebody suggested a Python 4 with a totally backwards incompatible but thread-safe C API now that I could see him having a cow over (even though I like that idea)
Is there a link explaining the suggestions succinctly?
- Multiple interpreters with mostly non-shared data in the same process.[1].
- VecPy, for number-crunching.[2]
- Newthreading, which I wrote in 2010.[3]
[1] https://lwn.net/Articles/650489/ [2] https://www.andrew.cmu.edu/user/dfarrow/proposal.html [3] http://www.animats.com/papers/languages/newthreadingintro.ht...
Re:Progress on the Gilectomy
by simcop2387 on Friday June 02, 2017 @03:48AM
(#14468221)
To be fair at least towards #1, that's a really difficult one to get right. Perl has had that kind of threading for a long time and it's almost always considered a bad decision to try to use them. I'm sure it could be done better, but perl did it via a complete copy on write setup in order to create the mostly non-shared data. But you end up with a lot of locking and other contention for the shared data because there's no good way to expose the fact that it's shared and changing it requires such restrictions. Instead the method usually used is to take advantage of most OS's built in COW when forking a new process and communicating via sockets, or some other method instead that forces you to deal with the limitations (copying data, or if you used shared memory you have to do explicit sharing and locking/serialization yourself).
Re:Progress on the Gilectomy
by omginternets on Friday June 02, 2017 @10:32AM
(#14470166)
>when this is suggested, Guido has a cow.
Like what?
My first reaction is to think "and he's [probably] right!"
Python's added value is it's very rich and flexible object model. Imposing restrictions on the object model is robbing Peter to pay Paul in an environment where Peter is more important, albeit for historical reasons.
A few restrictions on the language would make it easier, but when this is suggested, Guido has a cow.