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.

14

u/AlternativeAardvark6 Jan 12 '22

Full time Java (mostly) Dev here: Java 6 code might not run as well in more recent JVMs as they make you believe. I have clients that are still on 6 because their massive monoliths don't work on Java 8 or newer.

11

u/mortecouille Jan 12 '22

I'm also a full time java developer, you must admit that this is the exception rather than the rule. There are incompatibilities between versions, however very rarely anything as breaking as python2 vs 3. One example that comes to mind is usage of com.sun classes, which should not have been done in the first place.

Like probably everywhere else, we maintain ancient codebases and I can count the times I had to find an old version of the JDK on the fingers of one hand. And usually for troubleshooting a JDK-specific bug, not even because the code wouldn't run.

4

u/AlternativeAardvark6 Jan 12 '22

To be fair, we are a company with many clients that have decade old systems, last year I fixed a bug in a class that hasn't been touched since 2003. Millions of lines of code in systems that are used daily and where all new code depends on, so if there is a chance for something to go wrong by using JDK 8 we have a big chance of it happening sooner or later.