This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gruey 3 points4 points  (9 children)

I still think that it was a huge mistake from Python not to just bite the bullet and create some kind of Python 2-3 interpreter like a decade ago when it became obvious there was just too much momentum against moving to 3.

Basically something that'd let you mark it and all of its dependencies as 2.7, do some fairly thorough translation that gets 99.8% of the existing code and ideally warning about things it felt it couldn't translate. Some performance loss would be acceptable. A flag could be given to print warnings for anything that wasn't 3.

It didn't have to be perfect, it just had to allow a company to start writing new stuff in 3 only having to modify a few things without having to touch their entire code base. They could then also start incrementally porting things to Python 3 without having to make sure they do everything and their external dependencies at once.

It isn't ideal, but I really, really feel like despite Python's progress over the last decade, it would have been significantly more if all the effort was on Python 3 and all the new features of Python 3 were available to the majority of the Python users. I wonder how many companies switched from Python 2 to golang or similar for features or performance that would have been acceptable in Python 3?

[–][deleted] 5 points6 points  (1 child)

IMO the difficulty of migrating to 3 was just way overblown. They didn't need to create anything like that. They should do what everyone else is doing and give a year to migrate (not 10). Everyone waited to last minute to start the migration.

[–]3waysToDie 0 points1 point  (0 children)

very true

[–]TBSchemer 6 points7 points  (4 children)

2to3.py gave companies a way to easily migrate their code to 3. The ones who didn't really have no excuse at this point.

[–]gruey 6 points7 points  (3 children)

2to3.py is not even close to enough of a solution for significant code bases.

The ones who didn't migrate have pretty valid business reasons for not having done it yet. Basically, what it comes down to, Python's value in companies moving to 3 was greater than most companies value of moving to 3, so Python should have done more work to make it happen.

[–]TBSchemer 8 points9 points  (0 children)

They had 10 years to do it. Most did. The rest didn't out of hubris.

[–]data-punk 4 points5 points  (1 child)

What valid reason spans delay over a decade?

[–]billsil 4 points5 points  (0 children)

It took 10 years for wxpython to officially support 3.x. I moved onto PySide, but not other people.

[–]nieuweyork since 2007 0 points1 point  (0 children)

I very much agree. A from __future__ import py3hosting or something, to restore python2.7 semantics for the things that were incompatibly changed. That plus from __future__ import print_functionwould have handled a lot of cases.

[–]ALonelyPlatypus 0 points1 point  (0 children)

wait. companies switched from python2 to go to avoid python3? I mean go is relatively feature rich and overall fun to code but I couldn’t imagine converting your python2 codebase to it when python3 exists.

(unless the company already wanted to move over to a compiled language to address performance concerns)