Python2CPP ?

Szabolcs Berecz szabolcs.berecz at gmail.com
Wed Apr 12 08:24:28 EDT 2006


On 4/12/06, Michael Yanowitz <m.yanowitz at kearfott.com> wrote:
> 2) Efficiency. It is alot quicker to code something in Python. If I can
>    write it in Python and auto-convert it to C++. I would save time coding.

I don't think you will get a more efficient code. The reason is the
extremely dynamic nature of python. Almost everything is done at
runtime. I think one goal of PyPy is to automatically infer the types
of variable, but I don't think they have reached that point, yet. One
project you can consider is the psycho python package which generates
specialized native code at the price of high memory consumption.

> 3) Education. I would learn more about Python, C++, their similarities and
> differences.

I don't think so. Higher level languages translated to C are not very
readable (or at least that's what I have seen)

> 4) Other. Just want to know how well Language translators work these days. I
> have seen
>    Fortran2C and Pascal2C translators in the past. Would like to see how
> well these
>    work with Python.

Than I think PyPy is the way to go. I have heard about another project
with the goal of translating python to high efficiency C++ code but
forgot the url. Anybody?

Szabi



More information about the Python-list mailing list