First of all, why do people use Python so much? Well Python is one of those languages that is pretty simple to use, it tends to be people’s go-to for languages to learn as a beginner and people usually just stick to it. The thing is, Python has a lot of limitations and too many people are overusing it. Here’s just some of the reasons why you shouldn’t use it:
- It’s slow (And not just slightly, significantly) – But some libraries do use C/C++, which significantly improves speed
- Requires a runtime – Which is good in some ways, bad in others
- Limited multithreading (It’s single-threaded for the most part, which slows it down even more) – Though apparently recent versions of Python free the GIL (Global Interpreter Lock)
- Dynamically typed (Which can cause issues)
- High-level programming language – Though this won’t be an issue for most things
I’d only ever suggest using Python for things such as scripts or small tasks that don’t require a lot of power. However, for some reason people like to use it for AI, backends, and for some reason graphical (desktop) applications, websites and games. I understand that data scientists who make AI models don’t really know how to program so use it because it’s simple and straightforward. However, when it comes to actually using the models, I don’t understand why people still go with Python, it has so many downsides and limitations (See the list above).
What I find funny is that the libraries that people use to make AI models tend to be built in C, so I’m not too sure why they wouldn’t just port it to a language that can actually run quickly and on multiple threads – something like C#. The ML.NET framework that Microsoft has is based on TensorFlow which just runs on Python. I was thinking of using it to train a ML model on predicting the weather, since I thought it was actually made in C#, but I gave up on the idea after discovering that it just runs on Python.
People also overuse AI (Artificial Intelligence), people now just fit AI into anything they can possibly fit it into. Microsoft decided to add it to their iconic Paint application, and I think they’re even trying to fit it into notepad too. “Copilot” now comes bundled with Windows 11 and Microsoft have just renamed what previously was “Office 365”, recently was “Microsoft 365” and now is “Microsoft 365 Copilot“. But the thing is, you could use basic algorithms for a lot of what they’re getting AI to do.
What can you replace it with?
There are many languages (Pretty much every single one) that are better for what people tend to use Python for. Here are a few examples:
What to replace | What to replace it with |
---|---|
Backend | Depending on what you are using it for, you could use something like C# (Requires a runtime, so may be out of the picture) or Rust. |
Websites | Frameworks such as React or even just a custom HTML, CSS and JS site will do better than one in Python. |
AI/ML | Unfortunately there aren’t many alternatives to using Python for Artificial Intelligence or Machine Learning right now but hopefully in future there will be. |
Desktop applications Graphical applications | Languages such as C# (Requires a runtime, so may be out of the picture), Rust, C/C++ and many more have decent and easy-to-use GUI frameworks. |
What is your opinion around Python and Artificial Intelligence? Leave a comment below – I’d like to hear your thoughts.
Discover more from WTDawson
Subscribe to get the latest posts sent to your email.