3 ms·
Is this basically what Cython and PyPy are trying to do, but with Rust?
by tomrod 7y ago
Is this basically what Cython and PyPy are trying to do, but with Rust?
- sp332 7y agoPyPy is a JIT compiler. RustPython is an interpreter.
- yorwba 7y agoAnd Cython is an AOT compiler for a superset of Python. RustPython seems to be modestly aiming for a reimplementation of CPython.
- laughinghan 7y agoMaybe "dialect" would be more accurate than "superset"? I don't think Cython is technically a superset of Python, since I think runtime metaprogramming features like __dict__ and monkey-patching are significantly altered or restricted?
- loeg 7y agoYeah, I was going to make a similar comment. It's a dialect of CPython, and certainly there are extensions required to make it usable. But I'm not sure it is a strict superset of the full Python language.
- infinite8s 7y agoCython is a reification of the interpretation of a python program. Ie it converts the python code into the equivalent CPython API calls (which are all in C) thereby allowing the developer to interperse real C code. Anything you could do in python you could technically do in Cython, although it would be much more verbose.