3 ms·
Python 3.x has to be the future, there are lots of really well articulated reasons for that. The problem here is that the transition was not, in my opinion, ha
by robomartin 13y ago
Python 3.x has to be the future, there are lots of really well articulated reasons for that. The problem here is that the transition was not, in my opinion, handled intelligently.
What I mean by this is that in five years there are a number of things that could have been introduced incrementally and with minor impact to existing libraries. For example, making range() behave like xrange() seems trivial from a user's point of view. The same with print vs. print().
Yes, some of the other important differences would require breaking code in more serious ways. This, too, over five years, could have been introduced with incremental transition tools that would make the upgrading of existing libraries as automatic as possible.
If a language doesn't have massive and useful libraries you can play with it and break it. Nobody will care and adoption will be swift. That's not the case with Python. Aside from language benefits I'd say the main differentiating reason for which Python is really valuable is that there are libraries out there to do just about anything you want. Breaking (or un-breaking, depending on your perspective) the language breaks the libraries, therefore, no matter how wonderful the language might be it is a non-starter.
The transition from one version to the next has to be automatic. Nobody has the clock cycles to engage in months' long research projects to comb through code and fix things. No, tools like 2to3 are not what I am talking about.
One non-coding example I can offer is what happens when you open an old Solidworks file with a newer version of Solidworks. The program immediately fires-up a format converter and tells you it is converting to the new file format. Once done, you save and you are done. All you have to do is open the file and re-save it. That's how it should be. Surely in this day and age there's enough CS intelligence out there to make a fully automatic version-to-version converter. Now that would be something. It would certainly bring the Python community forward in unimaginable ways.
I'll go further and suggest that this could actually be an idea that could set Python apart: No new version is released without a matching fully-automatic old-to-new converter.
Hey, ideas are easy.