Python vs C++

Marko Rauhamaa marko at pacujo.net
Fri Aug 22 05:29:51 EDT 2014


Chris Angelico <rosuav at gmail.com>:

> On Fri, Aug 22, 2014 at 6:05 PM, Christian Gollwitzer <auriocus at gmx.de> wrote:
>> I'm not even convinced that the development time is significantly
>> lower in Python within this overlap.
>
> It usually will be, though not always.

Even more to the point, it is far easier to program correctly in Python
than C++. The higher-level concepts let you concentrate on the
high-level problem at hand instead of the low-level chores where you are
bound to make careless mistakes or take dangerous shortcuts.

So my advise is, use as high-level programming language as you can. If
you can't, deal with it, but often you can break your system into parts
where only a small corner needs to be implemented at the low level.

Remember, too, that there is a whole sliding scale of programming
languages:

   assembly
       C
          C++
              Go
                 Java/C#
                     Python
                         Scheme
                             Bash

In my current work, the choice is between C, Python and Bash. Some
non-STL C++ in the mix.

In my previous job, it was Java, Python and Bash, with some JNI in the
mix.

I think Python's abstraction level is excellent for most needs. C++ is
squeezed from all sides. Its downfall is that it is trying to cover
everything instead of just ceding the high-level turf to other
languages. Thus, it is too elaborate for the nimble stuff, and you will
often simply use C where you need nimble.

C is readily supported by all extension APIs. Its calling conventions
are stable and well-understood. Its runtime requirements are trivial.
Plus, you don't have to be a Medieval Scholar to program in it.


Marko



More information about the Python-list mailing list