Python vs C/C++

Python vs C/C++

Table of Contents

Python vs C/C++

Here’s another article on the same subject: Comparing Python with C and C++

I’ve read many articles concerning which is the better programming language, Python or C/C++, and in most of those articles, Python is the “overall winner”, even though everyone agrees that the execution time is longer. But when you run into a programmer that is serious about their workmanship, you’ll find that C/C++ is usually the winner. Why?

Well, what Python enthusiasts don’t tell you is that there are many versions of Python, from 2.7 up to 3.8 that are currently in use, at the same time! And there’s very little compatibility between them! This means that to have a “successful” development project, you will have to set up various “virtual environments” on your development machine, in order to mix and match not only the various versions of the python interpreter, but also different versions of a plethora of libraries! Not only that, but using pip or pip3 to install various packages can be extremely unreliable with many problems that usually end up requiring a re-installation of your favorite version of Linux!

And that is just the beginning of the problems with Python. Next, you are going to run into distribution problems galore, because after you release your Python project, it won’t work with the next version of some library, or maybe even the currently used Python interpreter!

One of the primary benefits often pointed out by Python developers is that it is much faster to develop a Python application than it is to develop a C/C++ application. But if you consider the hassles of creating very complex “virtual environments”, compatibility issues, distribution issues, and debugging issues, you eventually realize that all that development time you thought you saved, actually flew out the window!

Yes, I mentioned debugging issues. When you debug a python app, the debugging messages make no sense and don’t tell you anything that generally relates to the real problem. Debugging a Python app is pure guess work! Debugging a C/C++ app, on the other hand, involves much less guess work! Some bugs in a C/C++ app can be difficult to find, but not impossible. At least with C/C++ there’s hope of finding the real bug, but this is just not the case with Python!

For these reasons I have temporarily given up on Python development in favor of C/C++ development. When Python is really ready to compete with C/C++, it will have the following characteristics:

  • It will not require virtual environments for beginner Python developers!
  • It will have a standard method for installing libraries that works at least 90% of the time, rather than 10%.
  • Using the Debugger will be useful, not guess work!
  • It will have 100% success rate when beginners install it “system wide” on a Linux machine!
  • It will have an IDE that rivals Qt Creator! (Eric 6 comes close, but needs improvement)

In short, if you really want a dependable application, with fast execution, no distribution issues, that you can easily debug, the only real choice is still C/C++! I’m sorry for “bursting your bubble”, Python enthusiasts, but you still have a long way to go before you can change my mind. Here’s hoping you can sort out these issues soon!

Please check out our other Articles!