r/programminghorror • • Jan 12 '22

Python environment

https://imgs.xkcd.com/comics/python_environment.png

[removed] — view removed post

1.4k Upvotes

101 comments sorted by

View all comments

Show parent comments

79

u/mortecouille Jan 12 '22

It got to this mostly because they made the terrible, terrible decision to make python 3 not backwards-compatible. Python 3 came out in 2008 and in 2022, we are now barely seeing the end of python 2, which was officially EOL in 2020.

In comparison, that is only 2 years after java 6, which has now been basically defunct for years already. Not that it's a problem, because if you do have old java 6 code, you can still compile and run it with any subsequent java version. This means that people can painlessly upgrade: if you depend on a library that is not using java (say) 8, your java 8 program can depend on it without issues. This was not true for python. As a result, if you wanted to write something using an existing library, you were bound by the willingness of that library to upgrade to python 3. To this day, there are still old libraries out there that have not been ported to python 3.

The maintainers made the mistake of believing every python developer was equally invested in the language as they are, and assumed people would jump to upgrade their projects to python3. Unsurprisingly, this did not happen.

11

u/indign Jan 12 '22

Python 3 was always going to be incompatible with Python 2 because that's how version numbers work. Major version increment => breaking changes. What you're saying is that you wish Python 3 was never released at all. Well, the Python 2 interpreter is still available if you want to deal with its nonsense.

There were a lot of things about Python 2 that royally sucked (such as scoping rules, text encoding, and the ABI for language extension) that would have been impossible to fix in a backwards-compatible way. Python 3 is better, full stop.

0

u/[deleted] Jan 12 '22

[deleted]

6

u/mortecouille Jan 12 '22

The point is precisely that people haven't ported their stuff. As a user (not even a developer) the fact remains that you have to install both versions and fuck around.

Certainly some blame lies on developers: probably some were stubborn, some depended on abandoned projects which had no maintainer to port them, some had massive projects were the effort to port was too large.

But to me, the fact that it took a decade points to the language not providing an adequate update path, sufficient deprecation period and didn't sufficiently mitigate the incompatibilities. Python just went scorched earth and expected people to adapt just like that.