Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #76744

Re: Python vs C++

From Joseph Martinot-Lagarde <joseph.martinot-lagarde@m4x.org>
Subject Re: Python vs C++
Date 2014-08-21 20:05 +0200
References <CAKUKWzmnnrpm-9SVNAFu3G9vYf2w0ewAhnGeOge8B2NsDujamQ@mail.gmail.com> <CAPTjJmrO7fER7Wjgo6qNO9qHNJgkJ7Y3BFWBf1L=t-bOv4JV7w@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.13255.1408644345.18130.python-list@python.org> (permalink)

Show all headers | View raw


Le 21/08/2014 15:40, Chris Angelico a écrit :
> On Thu, Aug 21, 2014 at 10:54 PM, David Palao <dpalao.python@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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Python vs C++ Joseph Martinot-Lagarde <joseph.martinot-lagarde@m4x.org> - 2014-08-21 20:05 +0200

csiph-web