by fps-hero · 1mo ago · 0 comments
People are in love with the idea of a Pythonic language with the speed of an ahead of time compiled language. The issue is without 100% compatibility with existing CPython code, enabling you to use the existing interesting libraries of the Python ecosystem, you’ll get no interest.
There is a trivial subset of python which seems it could be made substantially faster, for example integer / floating point operations. Frustratingly people make attempts and get nowhere, encountering resistance and red tape. (See https://discuss.python.org/t/using-tagged-pointers-to-suppor...).
We even had this project, Pon, posted about 3 months ago (https://github.com/can1357/pon).
> pon is a JIT & AoT native compiler and runtime for Python 3.14, written in Rust.
This is all anyone has ever wanted. It was basically dismissed, and hasn’t been worked on since it was posted. If a project like that can’t inspire interest, I don’t know what will.
Turing completeness aside, it seems to have a different purpouse entirely.
Cython is Python-compatible with its own syntax extensions, and is meant for writing Python modules.
TurboPython is its own incompatible language that has some resemblance to Python and is presumably meant to be used independently of Python.
The source is valid Python though, with compiler warnings where the behavior diverges. In fact that's how it's tested: about 90% of the test cases are run through both TurboPython and CPython, and the output must be byte-identical. However, usually it doesn't work the other way around: not every Python program will pass TurboPython compilation, most will require adjustments to adhere to its stricter rules.
Example: https://github.com/trozen/tpy-lang/blob/master/tests/cases/a... (when run via CPython, the tpy package is a stub implementation of TurboPython's core types)