What are Python’s Disadvantages?

Rate this post

Python is among the fastest-growing major programming languages. Soon, it’ll become one of the most popular programming languages in the world.

Yet, Python has a few disadvantages compared to other programming languages.

These are the main drawbacks of Pythonโ€”ordered by how serious I find them:

  • Speed: If you care about speed, you should prefer the programming languages C or C++. Although one of the most popular Python implementations, CPython, is implemented in C, CPython compiles high-level Python code into low-level Python bytecode (see edit from Jeremy Stafford). The whole process makes it slow compared to compiling low-level C directly to machine code (without the additional layer). However, speed of execution may not be as important than speed of development as argued in this article.
  • Memory Consumption: Another disadvantage of Python is its large memory consumption compared to other programming languages (again C or C++). Python data types are flexible which incurs some higher memory overhead. This excellent article gives you everything you need to understand memory management in Python.
  • Mobile development: Although itโ€™s possible to develop mobile applications in Python, itโ€™s not Pythonโ€™s main focus. A programming language such as Java would suit your needs better: Most people today develop Android apps in Java (and as Sunil Kulkarni rightly pointed out in the comments, the Android OS is implemented in C). However, if you still want to develop mobile and interactive apps with Python, the library Kivy may be your friend!
  • Embedded apps and the Internet of Things: If it goes to cars, washing machines, and drawers, you better take C++ or Java. With C/C++, you can develop apps close to the โ€œbare metalโ€ (hardware). With Java, you can rely on the Java Virtual Machine to compile your apps to millions of different devices. But as usual, there are some workarounds how you can still use Python in embedded apps.
  • Native GPGPU for machine learning: Although there are efficient libraries for machine learning (some even written in C for performance reasons), Python is too much a high-level programming language to handle the high concurrency and fine-grained memory control of GPU-heavy applications. If you still want to implement CUDA with Python, check out this article.

Many of the disadvantages can also be seen as advantages: Python is not too close to hardware which makes it easily programmable and intuitive for beginners and even experts.

If you still love the Python programming language, feel free to dive deeper and learn your new skill of rapid code understanding by reading my new book: “Coffee Break Python Workbook”.

Leave a Comment