4 ms·
> The author is - quite obviously - staying the Python 3 VM should run Python 2 code, in the same way the JVM and CLR run other languages. There is no "CPython
by talideon 10y ago
> The author is - quite obviously - staying the Python 3 VM should run Python 2 code, in the same way the JVM and CLR run other languages.
There is no "CPython VM": no version of Python guarantees bytecode compatibility between versions. The bytecode is just an optimisation.
For a Python interpreter to support both Python 2 and Python 3, it would need to have have some source level way of telling the two apart. Bytecode doesn't even come into this.
> That the Python 3 VM doesn't run Python 2 code - and that the Python maintainers apparently say it can't - means the Python 3 VM isn't Turing complete.
No it doesn't. That's not what Turing Complete means.
Here's a pretty trivial way to demonstrate both Python 2 and Python 3 are Turing Complete: implement a Brainfuck interpreter in both. Brainfuck is Turing Complete (memory limits aside), and thus because you can implement a Turing Complete language in both Python 2 and Python 3, both are trivially proven as Turing Complete.
Zed's argument is like this: ARM processors can't run AMD64 code, thus ARM processors are not Turing Complete.
That argument is nonsense.
- nailer 10y ago> > That the Python 3 VM doesn't run Python 2 code - and that the Python maintainers apparently say it can't - means the Python 3 VM isn't Turing complete. > No it doesn't. You do realise the next four words in the post you're replying to is: > > This is nonsense obviously ? And then a reason why the claim is being made? To continue your CPU analogy (I actually read your post), it's like Intel saying x64 can't run x86 binaries, then someone else saying "why not, isn't it turing complete?" as a joke way of pointing out that it should. It perfectly reasonable to read Zed's post and argue that Python 3 VM should not be able to run Python 2 binaries. But not even bothering to read or comprehend the post (or this thread) and claiming he doesn't understand Turing machines is a waste of everyone's time. * We know AMD invented x64, and x64 does run x86 binaries, and the IA64/Itanium story, but anyway.
- talideon 10y agoThis is the bit I have a problem with: > but it's a way of pointing out that the claim that the Python 3 VM can't be made to run Python 2 code is also nonsense. And that's why I wrote: > For a Python interpreter to support both Python 2 and Python 3, it would need to have have some source level way of telling the two apart. [And now I have no way to double check what you wrote originally because you overwrote your original comment.]