Currently you cannot run Python 2 inside the Python 3 virtual machine. Since I cannot, that means Python 3 is not Turing Complete and should not be used by anyone.
Why can't the JVM run my C# code? Java isn't turing complete because the JVM doesn't support C#!
TL;DR: Python 3 isn't compatible with python 2, nor should anyone expect it to be. (major version change, smartass)
JavaScript versions 5 and 6 are very different, yet there is a compiler which compiles ES6 code to ES5 code. Thus compatibility is a non-issue in JavaScript world: you can mix and match ES6 and ES5 libraries.
Python developers just don't want to implement Python 2 compatibility in Python 3. It's not impossible, but they just want to force people to upgrade.
Even es6->5 conversion and polyfills are insufficient to cover things such as WeakMaps and WeakSets that depend on deep runtime integration, so even here there are clearly visible runtime changes. It's why the compat table exists!
I am in no way a zed supporter, but I believe the point he was making is there isn't a python 2 interpreter written in Python 3. The point is stupid, but it isn't quite as dumb as what you think he is saying.
Yeah, but that has nothing to do with turing completeness. Just because there hasn't been a python 2 interpreter written (because why in the world would you want to interpret python2 code in python 3) doesn't mean that it's impossible.
He's talking about python 2 being run in python 3's VM, which isn't even the same thing as an python 3 interpreting python 2.
In all fairness, he has done a lot for the Ruby community and more for FOSS in general. That said, I really don't understand his motivations here. He's kind of pissing into the wind. The most substantial thing I got out of this post is that Python 3 strings are "too hard" for beginners. I'm not really buying it.
Pypy is a python interpreter written in python, so the concept isn't totally foreign concept. I'm not sure if rpython is python 3 compatible, but it does mean you can run python 3 in python 2.
TL;DR: Python 3 isn't compatible with python 2, nor should anyone expect it to be. (major version change, smartass)
That's not even true, with some shims (e.g. six) and the features the later revisions of P3 re-added (e.g. u prefix) there is in fact a common subset of P2 and P3, and you can write single-source packages compatible with both.
In fact after some waffling around that's what most library authors have settled on, it's a bit of a pain in the ass but still way better than having to deal with completely separate codebases.
157
u/[deleted] Nov 24 '16
Why can't the JVM run my C# code? Java isn't turing complete because the JVM doesn't support C#!
He really needs to take a look at semver.
TL;DR: Python 3 isn't compatible with python 2, nor should anyone expect it to be. (major version change, smartass)