3 ms·
That's why Python receives a bad name, and for a good reason. Nobody is telling people who use Java since version 1 that they need to upgrade code if they want
by coliveira 7y ago
That's why Python receives a bad name, and for a good reason. Nobody is telling people who use Java since version 1 that they need to upgrade code if they want to continue using the language. The code just works, and will continue to work as long as there are compilers for Java. The same thing about C and C++, these languages introduce new features as times evolve, but they still allow users to retain their investment in old code. This is not the case with Python. Because of some bad design decisions, they inflicted pain on their users for more than a decade to force them into choosing one version or another. And now they are deprecating a version of the language that is still used by millions of people, causing again more trouble. Why in the world they need to deprecate this code when there are millions of people who use it all day long? I still see lots of code continuing to be written in Python 2, and all this code will have to be rewritten just because of some bad design and implementation decisions of a few people developing this language.
- Lt_Riza_Hawkeye 7y ago>Nobody is telling people who use Java since version 1 that they need to upgrade code if they want to continue using the language. The code just works, and will continue to work as long as there are compilers for Java This is the same with Python. Python 2 code will continue to work with python 2 interpreters, just as java 1 code will continue to work with java 1 JVMs and JDKs. But neither are being actively developed and Oracle will not even sell support for java 1, let alone release security updates.
- Yhippa 7y agoI'm on the outside looking in but practically speaking, why couldn't I "just use Python 3" then for everything?
- gvb 7y agoPython 2 and 3 are different compiler/interpreters. Python 2 code might run on a Python 3 interpreter, but probably not. When you run your python2 code, you can specify that it is to run on the Python 2 compiler/interpreter. The Python 2 compiler/interpreter will continue to run and thus be able to run python2 code for a very long time. Ubuntu 18.04 example: $ python --version Python 2.7.15+ $ python2 --version Python 2.7.15+ $ python3 --version Python 3.6.8 $ ls -l /usr/bin/python lrwxrwxrwx 1 root root 9 Apr 16 2018 /usr/bin/python -> python2.7
- gwbas1c 7y agoNo Typically version N+1 of a language compiles version N, N-1, all the way back to version 1. Usually, when this isn't the case, the incompatible areas of a language were either marked experimental, or obscure use cases that very few people use. Today's Java compiler will compile source code written for Java 1. The issue with Python 2 and Python 3 is extremely unusual in a language.
- coliveira 7y agoExactly. People who think that the Python situation is normal don't have any experience with programming languages. C compilers can compile code that was written 40 years ago. Java can do this all the way to version 1. Python requires you to make an effort to chose the version of language you want, otherwise the tooling system won't let you run that code. It is true that they later created tools to help with this process, but the mere existence of such hackery shows only how poorly conceived the idea really was.
- acdha 7y agoIf you think that’s true, you haven’t supported enough legacy C code. Yes, the core language hasn’t changed much - like Python - but the includes, libraries, operating system APIs, etc. have - and that’s before you learn how vague compatibility was for code written before sometime in the 90s. Similarly, I’ve seen large Java projects take years to upgrade while comparability issues are sorted out. In all cases, the real problem is technical debt management: rather than attacking people who gave you something for free, ask whether it’s possible that the experience has more to do with procrastinating on upgrades until many large changes have to be made at once with inadequate test automation.
- ilikehurdles 7y agoI might be misunderstanding your comment, but I have encountered source code that is not forward compatible in java. Some examples below... Incompatibilities between JDK 7 and JDK 6: https://www.oracle.com/technetwork/java/javase/compatibility-417013.html#jdk7 https://www.oracle.com/technetwork/java/javase/compatibility... Incompatibilities between JDK 8 and JDK 7: https://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html#A999387 https://www.oracle.com/technetwork/java/javase/8-compatibili... An exerpt from the Compatibility Guide for JDK 8 [1]: >In general, the source compatibility policy is to avoid introducing source code incompatibilities. However, implementation of some Java SE 8 features required changes that could cause code that compiled with Java SE 7 to fail to compile with Java SE 8. See Incompatibilities between Java SE 8 and Java SE 7 and Incompatibilities between JDK 8 and JDK 7 for information. There are also a plethora of deprecated and removed APIs throughout Java's history. [1]:https://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html#A999097 https://www.oracle.com/technetwork/java/javase/8-compatibili...
- makecheck 7y agoHow much did you personally contribute to the success of Python, or any of the dozens of FREE software tools you probably use daily (and perhaps hundreds or thousands, once you factor in transient dependencies), to justify such criticism for their work? Some of their “bad” designs were made decades ago, before it was even clear where the industry was going. Take Unicode: lots of bets were made on that, and arguably Windows got it way wrong. Sure their APIs are still “compatible” but what is that worth, when strings are an inconsistent mess that to this day require developer hacks? And that’s an OS people pay for, written by competent engineers as well. If you don’t like your free software, please feel free not to use it anymore.
- bobbylarrybobby 7y agoNo one is saying you can no longer use Python 2. The community is just saying that if you do, you're more or less on your own. Python 2 won't magically stop working on Jan 1 2020.
- coliveira 7y agoIn the world of commercial computing, nobody can work on a language that is not supported. Essentially what they are saying is that companies need to scramble to port their code to Python 3 or risk running their systems in an unsupported language. This will in practice be just another hurdle that users need to go through to continue using Python.
- Sphax 7y agoThose companies can pay someone else to provide support for Python 2.