← Back to context

Comment by lucianmarin

13 hours ago

A programming language similar to Python that compiles to Rust or Go will be amazing.

Mojo is a language with Pythonic syntax that compiles to fast machine code built by the creator of Swift: https://www.modular.com/open-source/mojo

Spy (https://github.com/spylang/spy) is an early version of this kind of thing. I believe it compiles to C though, kinda like Nim. Actually speaking of Nim, that's probably the most mature language in this space, although it's less pythonic than Spy

Nim looks a lot like Python with a first-class type system and compiles to many different targets, including wasm and C.

Here you are. https://github.com/google/grumpy

Last commit was 9 years ago though, so targets Python 2.7.

  • Amazing people still keep discovering it. And google search fails to surface working implementations.

    "Python to rust transpiler" -> pyrs (py2many is a successor) "Python to go transpiler" -> pytago

    Grumpy was written around a time when people thought golang would replace python. Google stopped supporting it a decade ago.

    Even the 2022 project by a high school student got more SEO

    https://github.com/py2many/py2many/issues/518