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:
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 'Fortnite', 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.
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.