Python is one of the most popular programming languages of recent years. Its clear syntax and readability make it the perfect coding language for beginners. It’s forgivable to think that learning Python was essential given its wide usage.
This raises the question: when is Python NOT the right answer? When is the Python programming language the wrong language to learn and/or use?
What Python Is Good For
In short, Python is becoming the language of machine learning. Most machine language courses are written using the Python language, and coding education as a whole has adopted Python as the language to learn, with wide use in classrooms, on Raspberry Pi, and elsewhere.
These reasons, along with the plethora of big companies using Python, leave many thinking it is the main programming language of the future. But if Python is such a Swiss Army Knife, when wouldn’t you use it?
1. You Want to Be a Web Developer
Python is more than capable of large-scale web development. Instagram is the largest site running Django, a Python web framework. This is no mean feat, as Instagram engineer Zekun Li explains:
“We began using Python early on because of its simplicity, but we’ve had to do many hacks over the years to keep it simple as we’ve scaled.”
That said, Django is a robust, elegant framework. The issue does not lie with its failings as such. The simple question is: why learn Django when JavaScript is still so dominant?
JavaScript frameworks like React and Vue.js are in high demand. Both can use Django or other back-ends like Ruby on Rails. However, since both are JavaScript-based languages, why would you use anything other than Node.js? This makes for a full stack JavaScript application. One language to learn and master.
This is not to say that JavaScript is a perfect language; many would argue the opposite. If you are starting out in web development, however, there is still no better choice than JavaScript.
2. You Want to Be a Game Developer
Users of Pygame might find this section a little confusing. Isn’t there a well-regarded library specifically for creating computer games in Python? Yes, there is, and Pygame is a fantastic resource for learning Python and game mechanics.
Some good games have been written in Python, and there is even a first-person shooter made entirely in Pygame:
Without taking away from the incredible achievement that DUGA is, you can see the issue here. Most (but not all) people wanting to get into game development are looking for something more. A robust platform with development tools and an editor. The potential to scale from a small idea up to something large and more mainstream.
Python cannot offer this, whereas game engines like Unity and Unreal can.
Learn C# for Unity
Unity is based solely on C#, with a considerable number of libraries on top to help with game development. The Unity editor is a very powerful tool allowing for quick prototyping, and a fast start for beginners making their first game.
For a comparison of scale and visual beauty, Escape From Tarkov is a Unity Engine creation:
Much like low-level Python tutorials cover programming essentials, Unity’s official tutorials assume no prior programming knowledge.
Learn C++ for Unreal Engine
C++ is somewhat notorious for being difficult to learn. There are resources online for beginners, and the Unreal Engine website has some great getting started tools too.
If you need any evidence that Unreal Engine games can be a success, look no further than Fortnite. This hugely popular game, which you can even play on your mobile, was created and optimized using Unreal.
Games that look like this, and run at 1080p with good frame-rates, are currently not possible using Python. This is not a failing on Python’s part, more a simple case of game development not being one of its strengths.
3. You Want to Work With Low Level Systems
While the amateur robotics community loves Python, it isn’t the best language for the job. In many low level and embedded systems, Python isn’t an option.
Embedded Systems
While the definition of what an embedded system is has become blurred in recent years, there is a good analogy. It’s safe to consider small development boards such as Arduino as embedded. Larger, more complex devices like Raspberry Pis or similar single board computers are generally not seen as embedded.
The issue lies where memory and timing are essential. An 8-bit chip in a piece of embedded hardware needs to have its memory managed very carefully. This is not something Python is suited for, and there is a reason why the Arduino language is a simplified version of C/C++. Getting a grasp of Arduino’s version of C++ is less complex than you would think.
The C programming language is as powerful as it can be dangerous. Despite being high-level, C and its C++ super-set can access low-level processes. Essentially, C was the first translation of machine code into something that humans could easily understand.
Precision and Speed
On top of the ability to manage systems at a low level, C comes with a speed increase. Since C is a very raw language, there are no overheads or garbage collection to slow it down. This is where C gets its reputation for being dangerous, as memory leaks can cause terrible problems. It does mean, however, that C shines where timing and speed are critical.
Anyone looking to get into hardware programming or any form of kernel programming should consider looking into C. The same is true for anyone wishing to create device drivers.
Bonus fact: Have you used VSTs to create digital music and wondered how to make them? You can write your own using C++.
4. Do You Need Python?
While this may sound obvious—if you already know another capable coding language, why change?
If you took a coding class in school, or started an online coding course in a particular language, sticking to it has benefits. Learning your first language gives you the fundamentals of programming, and switching to learn a whole new syntax slows that process down.
Most top level Python coders didn’t begin working with the language. Due to its highly readable nature and intuitive syntax, many find it easier to learn Python coming from other languages.
Maybe You Should Learn Python After All
There are so many languages out there that choosing can be stressful. The truth is, there can never be a perfect language for everything.
But Python is popular, multi-use, and great for beginners. Learn more about the benefits of Python programming and see our most commonly asked questions about Python.
Read the full article: 4 Reasons Why Python Isn’t the Programming Language for You