Header Ads

The Pros and Cons of Python

The Pros and Cons of Python


Python is one of the world's most popular and fastest-growing programming languages. It's an officially recognized language by companies like Google and other large tech companies and it's well on its way to becoming one of the world's most popular programming languages. Now in this article, I'm going to discuss the pros and cons of Python and what's holding it back from becoming one of the best languages that we've ever seen.


Pros of the Python


1. Easy to learn

Now probably one of the biggest advantages Python has compared to any other programming language is how usable it is. Now. This language by far in my opinion one of the easiest programming languages to learn and it's capable of doing very powerful things that you wouldn't expect something so easy to learn would be able to do. Now some people may classify this as a disadvantage which we'll talk about later but this is one of the reasons the language has been skyrocketing in popularity recently.

It really makes the developer's lives easier and it's one of the reasons that a lot of people get into programming nowadays because there are languages like Python that are much easier to use. They don't have to deal with the complicated lower-end code and memory references and all of that and then go straight into building nice web applications and GUIs and complicated things that maybe something like a scratch or a very beginner kind of programming language or builder might not be able to do.


2. Number of resources

Another mass advantage of Python is the number of resources that exist online for it. Now typically you're going to have tons of resources for every programming language that you use but Python has an extreme amount available for free on the internet. This essentially means that when you're developing something if you want to create some specific application you need a specific piece of code.

You want to do something. Chances are you're going to be able to find it online and it's probably going to be a high-value resource. Now this is great and it's assumed for most popular languages but I have to mention it because there's a lot of languages and especially older ones that don't have great resources out there.

And especially if you're a beginner you may struggle to kind of pick up the language and figure out how to use it if you're using outdated material or you just don't have the best resources available to you. 


3. Modules & packages

Now, this leads me kind of into the next point which goes with I guess resources which is the number of modules and packages that Python has. This has to be one of the language's top pros in comparison to any other language in that whatever you want to do you probably already have a Foundation built for you and all you have to do is import that package. Now Python makes it extremely easy to first of all install and second of all import packages which in other languages.

And I can tell you when I've worked with some Android development with Java is just an absolute nightmare to do so. This means if you're trying to create a website trying to create a game or a Gui you can probably do it in Python without having to know all of the specifics of that kind of app because you can just bring in a package like Pi Game or Jango that has a framework and have something built for you already.

And all you have to do is learn how to use that. And typically these modules in popular ones have lots of tutorials online or they have some great documentation that you can read to figure out how to use that.


4. Web development

Now I've mentioned web development so I'm going to go on a little kind of strain here about why Python is so great for web development. And this again is one of the pros of the language. It actually has a very good Asynchronous programming interface. So it's just called the Async IO module or the Async module which makes it really awesome for creating all kinds of web services and websites.

Now obviously there's popular frameworks out there for Python like Jango and Flask and companies like Instagram and Tender actually built their original applications using Jango. I'm not sure if they still are built off that now but I know originally they were built using that and creating web services and Rest APIs.

Using Python is actually extremely easy. And a lot of people prefer doing it in this language because it's fairly easy to maintain based on the readability and it's just really really easy to do. And we keep coming back to this is how easy Python makes things compared to other languages.


5. Get things done quickly & easily

Again one of the reasons why it's so popular is a massive pro of the language. You can just get things done quickly and easily. And if you're beginner chances are you can find some resources that are gonna help you out.


6. Machine learning & artificial intelligence

Now into my next point here which is another massive pro Python is going to be machine learning and artificial intelligence. Now there's nothing really out there other than maybe are if you use that a lot. That kind of rivals Python when it comes to machine learning an AI. And the reason for that is well the number of modules that exist for the Python language not only is it dynamic which just makes things much faster to kind of type out and get things done in.

And the readability is really great when you're creating machine learning apps because it's just fast easy to fix easy to get things done and create kind of prototype models. But with these modules like NumPy and TensorFlow and Keras and all of these awesome libraries you don't really have to know that much about machine learning to actually create applications and start messing around with it.

And I've done a ton of machine learning and AI. I'm I don't know that much about math. I'm not that good at it. And I can do that in Python because of the number of resources that exist.


7. It isn't as big as the other ones

Now my last kind of pro for the Python language and it isn't as big as the other ones that I've mentioned is that it's becoming available on more and more different devices. Now what I mean by this really is kind of the Raspberry Pi as we start to see these kinds of smaller computers that run Python on them. This is a really exciting and massive advantage for the language because it opens up the possibilities for what you can do.

Being able to have a tiny little portable board that can run your Python code on it is huge and it's awesome when you're trying to create robots and just different kind of cool fun things where you can just use these little microprocessors, little micro boards, to run your Python code.

So I figured I'd throw it in here. It's not a massive advantage of the language. But I think as we kind of go through the years we're gonna see that Python is on more and more devices and when you can run them on the really small boards like that it really just expands the Horizons for what's possible and makes the language even more versatile than it already is.


Cons of Python

Now I want to quickly mention that Python is personally my favorite programming language. Now that's just so when you guys are listening to this you can possibly pick out any bias I might have. But also I want you to realize that I'm really not just trying to bring the language down. I love the language. It's a great language. It's personally my favorite. And everything I say here is meant to be objective and it's something that you need to realize if you're a Python developer because there's just times when Pythons really isn't the best language.

And if you're just trying to fight someone on why the language is so much better you should really consider these things because in many applications there's languages that are going to be better than Python for those specific applications.


1. Very slow language

Now when I say slow I don't mean like Oh your code takes seconds to run. I mean that in general when you're trying to do something very very quickly Python is not going to be your best option. Now there's a variety of different reasons for that. I won't go into it. Exactly. But just languages like C C maybe lower-level languages are gonna be much faster than Python typically.

And when you have algorithms that need to run quickly maybe you're doing sorting or searching or maybe you're just doing something on an integrated piece of hardware that needs to meet a specific speed requirement. You're probably not going to use Python and to really break it down simply for you guys.

If you're looking at some low-level code written and see compared to your higher-level Python code and you're running an advanced algorithm that needs to do something very quickly chances are and I'd be willing to bet you the C Code is gonna run that faster.


2. Bad for game development & 3D rendering

Now, this brings me to my next point which is Python is really bad for game development and 3D rendering. Now one of the reasons it's bad for 3D rendering is because 3D rendering is extremely computationally heavy. You might see or you might hear when you're running it on your computer and the fans are just going crazy. So when you have a slower language trying to do 3D rendering is more difficult.

And I'm sure there some other reasons why it's more difficult than maybe I'm not as educated on that. Some people could leave in the comments down below but this also means that game development is gonna be much more difficult with Python. You can't use something like Unity with Python which is a very popular game development engine. And really doing anything more than 2D games is just it's not gonna get done in Python or it's not gonna be as good as you want it to be.


3. Sucks on mobile

And I almost just want to say Python doesn't exist on mobile. I know that's wrong but really trying to create Python applications for mobile phones like iPhone or Android is really difficult and it's just such a pain. I would almost be willing to say it's probably easier for you just to learn a language like I think it's called Kotlin or Java and just learn how to do Android development rather than try to figure out how to do it with Python.

Because Yeah you can use modules like give. But when it actually comes to deploying these apps out and using them usually sucks. And usually, it's not great when you're trying to update them and there's just so many issues with it and we're really not there yet when it comes to Python on mobile apps.

So that's a major disadvantage as well. If you're thinking about becoming a mobile app developer I don't know. I wouldn't recommend Python to be the language that you learn.


4. Global interpreter lock

Now the next major disadvantage here is going to be the global interpreter lock. Now essentially what this is is you can't run more than one thread at the same time in the same Python interpreter. Now I'm not gonna go into detail and talk about exactly how this works but what this means is that multiprocessing in Python is much more difficult. Now if you know what multi-processing is like you guys will understand why you can't do this with the global interpreter lock so I'll leave it at that.

But it's something to consider if you're trying to create and kind of parallelism in your Python application, it is possible you can do it but it's much more difficult and it's much more of a pain. more things to learn and kind of more things to deal with in the language.


5. Not good for large projects

My last con of Python here and this is kind of opinionated because it's not necessarily factual is that for large projects, python is not always the best choice. Now even if you can create everything with Python you know Python supports whatever you're trying to do some people will prefer to use a more structured language maybe like Java or C++ when creating out larger applications because of the amount of structure that it imposes on your programmers.

Now, this is just something I've read a lot and I've heard from a lot of people in the industry is that Python allows you to almost do too much. It's almost too flexible and when you're creating really large robust applications and you have a ton of different people working on it you almost want to make sure that specific people can't do these kinds of weird key things that you can do in Python and mess up your codebase.

If that makes sense, you want clean readable code, you want everything to be nice and structured, you want interfaces, you want inheritance, you want classes all of this. And with Python all of this is possible but it's just sometimes it's easy to get carried away and do things the pythonic way rather than do them the more maintainable and sustainable way.

So that's something I figured I'd mention here just because some people do mention that and you know it's something to look into more if you're really thinking about that specific kana the language when working on a very large project. Now I know a lot of you guys are programmers and I'm sure you have a ton of different projects. you've worked on probably using the Python language.


Last words

So anyways that has kind of been the articles on the pros and cons of Python. I just want to make it clear that again some of this has been my opinion so you know take it with a grain of salt but Python is great for so many different things. And there's a reason that's becoming one of the most popular programming languages in the world.

Now this being said, it does have a bunch of disadvantages, and please don't fall into the trap where you love the language so much that you neglect those disadvantages and don't advance your skills and learn other languages that you know can be better in specific areas. So anyways that has been it, I hope you guys found this article helpful if you did leave a comment below and share this article with others.

No comments

please do not enter any spam link in the comment box.

Powered by Blogger.