-   Programming (
-   -   Python vs C++ (

Mr. Alex 07-05-2012 12:07 PM

Python vs C++
Is there anything that can be done in C++ and can't be done in Python bacause Python is so high-level and C++ is not?

silendo 07-05-2012 12:19 PM

Hello boy, python and c++ are similar and you can done identical here. In the python there are graphical libraries how in the C++.
Python is multiplatform interpreter (it's work also on the smartphone) while C++ isn't work.
I like python for the fast and simple applications :)

dugan 07-05-2012 12:20 PM

Yes there are.

Oh, you wanted examples? Using QML to write your Qt applications is the the first thing that comes to mind.

sycamorex 07-05-2012 12:29 PM

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, ie the standard Python) is slowly gaining popularity.

Sergei Steshenko 07-05-2012 01:10 PM


Originally Posted by Mr. Alex (Post 4720018)
Is there anything that can be done in C++ and can't be done in Python ...

Sure - you can take a pointer in C++ and can not in Python.

And, AFAIK, Python doesn't have static polymorphism.

sundialsvcs 07-06-2012 10:08 AM

Typically, languages such as Python work in tandem with low-level tools 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 else that you need to do, Python itself (which is, of course, also a large and sophisticated C/C++ program ...) 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 efficiency (but considerable gains in far-more-expensive human efficiency). So, it's simply not a "versus" issue at all.

Q: Scalpel vs. chain-saw?
A: Well, it depends on exactly what it is you are trying to cut ...

All times are GMT -5. The time now is 11:48 AM.