3 ms·
>the python core team burned the community for 10 years with the 2-3 switch, and a GIL change would be likely as impactfu A core team led by him, which also ha
by coldtea 3y ago
>the python core team burned the community for 10 years with the 2-3 switch, and a GIL change would be likely as impactfu
A core team led by him, which also had the opportunity to make much more impactful changes during 3, including removing the GIL, since they were going to mess up compatibility anyway, but didn't.
All that mess (and resulting split and multi-year slowdown in Py3 adoption) just to put in the utf-8 change and some trivial changes. It's only after 3.5 or so that 3 became interesting.
- paulddraper 3y agoIt's hard to argue that Python 3 should have been even less compatible.
- coldtea 3y agoIs it? It took the 5 year (at least) adoption hit anyway. How worse would it be if it had more features people want? I'd say it should have been less compatible when needed to add more substantial changes people wanted, as opposed to taking the hit for nothing! And it should be more compatible for things that were stupid decisions that had to eventually take back, like not having a bytes str solution.
- paulddraper 3y ago> How worse would it be 8 years or never
- misnome 3y ago> How worse would it be raku
- eesmith 3y ago> if it had more features people want What people wanted was features to help with the migration. Yes, that of course having those features would have helped. But doing that required experience the Python developers didn't have when they were doing 3.0! The Python developers thought people could do a one-off syntactic code translation (2to3), perhaps even at install time, rather than what most people did - write to the common subset of 2 and 3, with helpers like the 'six' package. What are the "more substantial changes" you propose? The walrus operator? Matching? Other things that Python 3 eventually gained, and which took years in some cases to develop? Or are you proposing something that would have it more difficult to write to the common subset? That subset compatibility necessity extends to the Python/C API. Get rid of global state and you'll need to replace things like: PyErr_SetString(PyExc_ValueError, "embedded null character"); with something that passes in the current execution state. Make that too hard, and you inhibit migration of existing extension modules, which further inhibits the migration.
- coldtea 3y ago>The Python developers thought people could do a one-off syntactic code translation (2to3), perhaps even at install time Perhaps they overstimated how much of the change 2to3 would handle, but they surely didn't think that, because they already knew that they put in all kinds of not automatable via "syntactic code translation" changes - where context is needed (e.g. the str changes). >What are the "more substantial changes" you propose? The walrus operator? Matching? Other things that Python 3 eventually gained, and which took years in some cases to develop? No GIL, more optimization - a wasted opportunity for a big speed bump, dropping legacy stuff, typing support, an improved C extension model, JIT, specialization, green threads, and so on. Things like the walrus operator would be at the very bottom... They could have gone for "compatibility" to ease the migration (or make it a non-issue, just run backwards compatibly) sure. But since they decided to go ahead and break things, and bump the version name, a change the community has been discussing since the mid-90s as some grand vision of big changes, they could have done more substantial stuff at least. At it stands, they broke compatibility and cost the community 5-6 years for nothing much. Everything big came later in 3.x. And not because it couldn't just as well be added piecemeal to some 2.8 and onwards...
- mardifoufs 3y agoAgreed. It would have pushed the 2->3 migration from "very painful for the ecosystem" to a full on perl5->6 break between the two versions. Not sure it would have survived that.
- __d 3y agoIt's not like Python adoption and use was significantly boosted by Python3: it was and would have been just fine without it. The problem with languages written by language designers/implementers is that they often don't know when to stop. Wirth is a shining example here: Pascal -> Modula(n) -> Oberon. You need to move on, and leave the old alone.
- regularfry 3y agoI think that's called "learning from one's mistakes". I hope.
- progmetaldev 3y agoI believe it's a lot easier to state this long after the migration took place. Removing the GIL, or any host of other changes, could have split the community to a place where the language would have been abandoned except amongst a small minority. At this point, removing the GIL is such a large change, it would probably be better to wait for the end of (practical) performance to single-threaded code, and then remove the GIL. At that point you would have a community consensus behind the change, and the holdouts wouldn't have a stranglehold on keeping the community from moving forward. I'm not sure if I would call the move from 2 -> 3 a trivial change, but maybe you're more well versed in Python than I am (and I'm fully willing to admit that may be the case).
- Izkata 3y agoIt was such a big screwup they had to backtrack on one of the changes, resulting in 2.7 -> 3.3 being easier than 2.7 -> 3.0
- bornfreddy 3y agoDo you have in mind u'unicode' syntax?
- Izkata 3y agoYep Edit: To be clear, it specifically made it difficult to support 2 and 3 at the same time, which was a problem for libraries. And without the libraries supporting 3, app code wouldn't be able to migrate either.