Open in TheBrain

python vs C++

<p>Jan 27, 2013 12:45 PM

&#160;

see linuxquestions below:

&#160;

see sundialsvcs answer: &#160;

&#160;</p>

<div id="post_message_4720827" >Typically, languages such as Python&#160;<i>work in tandem with</i>&#160;low-level&#160;<a href="http://www.linuxquestions.org/questions/#" class="kLink" id="KonaLink5" >tools</a>&#160;such as C/C++. You are given "a nice, fuzzy, easy-to-use Python library" which, as it so happens, invokes lower-level C/C++ code and external libraries to do the heavy lifting. Meanwhile, for everything&#160;<i>else</i>&#160;that you need to do, Python itself (which is, of course,&#160;<i>also</i>&#160;a large and sophisticated C/C++&#160;<a href="http://www.linuxquestions.org/questions/#" class="kLink" id="KonaLink6" >program</a>&#160;...) is fast-enough, efficient, and readily available.

In this scenario, C/C++ becomes a more specialized tool: used to construct higher-level languages such as Python itself; and used to implement specific, targeted functionality (in the form of libraries and subroutines accessible to the higher-level language tools). In this way, you play to each language's respective strengths (and designs), with no significant loss in computer&#160;<a href="http://www.linuxquestions.org/questions/#" class="kLink" id="KonaLink7" >efficiency</a>&#160;(but considerable gains in far-more-expensive&#160;<i>human</i>&#160;efficiency). So, it's simply not a "versus" issue at all.

<b>Q:</b>&#160;Scalpel vs. chain-saw?

<b>A:</b>&#160;Well, it depends on exactly what it is you are trying to cut ...</div>

<div class="smallfont" ></div>

<p><br class="Apple-interchange-newline" />

In other words, C++ is a waste of time!

&#160;

also see sycamorex answer...

&#160;

Python is an interpreted language and tends to run slower than C++ (compiled language) but it's easier to code and takes less code to accomplish the same thing. As far as python's slowness is concerned, PyPy (which is faster than CPython,&#160;<a href="http://www.linuxquestions.org/questions/#" class="kLink" id="KonaLink4" >ie</a>&#160;the standard Python) is slowly gaining popularity.

&#160;

hghg

&#160;

&#160;</p>