Python vs C++

Joseph Martinot-Lagarde joseph.martinot-lagarde at m4x.org
Thu Aug 21 14:05:25 EDT 2014


Le 21/08/2014 15:40, Chris Angelico a écrit :
> On Thu, Aug 21, 2014 at 10:54 PM, David Palao <dpalao.python at gmail.com> wrote:
>> Why to use C++ instead of python?
>>
>> This is, perhaps, a bit off-topic, but I really want to know the
>> thoughts of experienced python programmers on it.
>
> No, it's a fair question. Why are we all here?
>
> The fact is, there's not a huge amount of reason left. If you're
> linking against a C++ API, you may find it easiest to do the whole
> program in C++, rather than use something like Cython (which, as far
> as I'm aware, is C-only) or write a two-part project. And obviously if
> you have an existing C++ codebase, then porting it has costs, and
> maintaining it is probably better. But for the most part, I would
> strongly recommend starting a project in a high level language like
> Python unless there's a really compelling reason to do otherwise. C++
> has, of late, been growing a number of features that belong in higher
> level languages; but if you want those sorts of features, why not just
> grab Python or Pike or something and save yourself the trouble?

For information, Cython works with C++ now: 
http://docs.cython.org/src/userguide/wrapping_CPlusPlus.html.

Joseph




More information about the Python-list mailing list