The core issue in the Python 3 transition (from my view)

June 14, 2013

In response to my entry about how Python 3 has always made me kind of angry, a commentator asked an interesting question:

You're right. Python developers aren't the first people to deprecate a heavily-used product. Is there anyone who has made an incompatible transition like this whom you can point to as a good example to follow?

[...]

So, what do you do as a developer? What's a better way to shed the cruft of some bad choices while not making people angry and not having to keep adding new features to the code that has given you headaches for so long?

As I read it, this question contains a hidden assumption: that you are going to make an abrupt and thus incompatible transition. I don't think that there's any good way to do this in a language and I don't know of any languages that have managed it gracefully once they got a significant number of users. An incompatible transition by definition creates not one language but two closely related languages, possibly somewhat translateable.

(It's theoretically possible to successfully do a transition like this; what you need is a tool that mechanically rewrites old code to be new, working code. Go actually has such a thing for many language and library changes. 2to3 was not such a tool.)

Such transitions are almost always the result of choices, or really one choice, that of the developers choosing to walk away from the old code. If you refuse to do any work to have a graceful transition then of course you don't get one. This is more or less what I remember the Python developers doing, at least initially; Python 2.7 people had a few limited bones thrown to them but not really all that many. In theory I think it would have been perfectly possible to do a much more graceful transition between Python 2 and Python 3. It just would have taken more time and required adding more things to Python 2 (and probably to its standard library).

(For 'code' one should really read 'language design'. I don't think that the actual CPython code base underwent any particularly major upheavals and rewrites between Python 2.7 and Python 3 and all of the issues that the Python developers say prompted Python 3 were about historical warts in the language.)

There's more I could say on this but in the end none of it matters. The Python developers made a decision that they were not interested in doing further work on Python 2.7 and users of Python could more or less lump it. If the developers are not interested in a graceful transition, you do not get one.

Written on 14 June 2013.
« I don't usually think about IO transfer times
I'm considering building a custom laptop environment »

Page tools: View Source.
Search:
Login: Password:

Last modified: Fri Jun 14 01:57:58 2013
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.