Make Python Compilable, convert to Python source to Go

Chris Angelico rosuav at gmail.com
Sun May 25 00:47:27 EDT 2014


On Sun, May 25, 2014 at 1:06 PM, bookaa bookaa <rorsoft at gmail.com> wrote:
> This tool can be called 'Python to GoLang', which translate Python source to Golang source. And then you can compile the Go files to executable binary. (btw: Go is a new C-like compilable language, open source).
>

Sounds like you're writing a Python implementation that uses a Go
backend. As Pythons go, this is comparable to using Java, or Mono, or
RPython, or C, or anything else. So there are two questions:

1) How compatible is your Python-to-Golang converter with all the
nuances of Python code? Does it work perfectly on any arbitrary Python
script? And, what version of Python is it aimed at?

2) What's performance like? Presumably significantly better than
CPython, as that's what you're boasting here. Have you run a
standardized benchmark? How do the numbers look?

If the answer is "It'll work on anything, but it's only faster if you
restrict yourself to a specific subset of Python syntax", that's still
useful. But we'd need to see figures that tell us when it's worth
adding a separate dependency and another translation layer (after all,
every layer adds its own bug potential).

ChrisA



More information about the Python-list mailing list