At the time of writing this blog, Python without doubt is the most popular programming language in the world. However there is a lot of debate going on about this statement concerning the performance of the language in real-time large scale projects. Well, we'll try to address all of that as we see sail through this post.
But first things first, let's understand what python is. Without having a clear picture, we can't nosedive into the pros and cons of the language.
What kind of snake is this?
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Python was fathered by a man called Guido Van Rossum, which he started as a 'hobby programming project' that would keep him occupied during the week around Christmas in 1989. Little did he know that this 'fun project' would turn the programming world around.
When he began implementing Python, Guido was also reading the published scripts from "Monty Python's Flying Circus", a BBC comedy series from the 1970s. He thought he needed a name that was short, unique, and slightly mysterious, so he decided to call the language Python.
The guy indeed is a genius! you can learn more about him in the embedded link, because this post is not about the Da Vinci himself but his Monalisa. Now let's dive into the actual stuff.
Guido van Rossum is a Dutch programmer. He is the creator of the Python programming language, for which he was the "benevolent dictator for life" (BDFL) until he stepped down from the position on 12 July 2018. He remained a member of the Python Steering Council through 2019, and withdrew from nominations for the 2020 election.
Why this reptile is being celebrated all over the world?
Well... There are a lot many reasons for that. Let me list a few.
User Friendliness
As we mentioned earlier, in any online debate that you pull up about this language, you'll find this point. Python is dynamically typed (i.e) No need to define the datatype during initialization of variables as this is being done at runtime automatically. Unlike languages like C++ and Java, where you have to define the datatype of variables at the time of initialization.
Also, python's syntax is very simple. One could say it is the closest popular language to plain English. The learning curve especially for new coders is very steep. I am a statistics grad, and starting with python as my first programming language with no prior programming experience was pretty easy for me.
Swift Development
Python is efficient and reliable, allowing developers to create powerful applications with a minimum of effort. Thanks to its pretty simple syntax. Python is handy if you want to code fast and it is pretty fast too. Yes, compared to some other languages, such as Java, C#, Go, JavaScript, or C++, Python often has a slightly slower execution speed. However, in todayβs world, development time is much more important than computer run time. And in terms of time-to-market, Python simply cannot be beaten.
Flexibility and Vast Community
Yes, This guy could be a murderer and monk at the same time. Python maybe used to develop any kind of application in any industry or domain. Python is often described as a general-purpose programming language, unlike some domain-specific languages which are designed only for certain application types. π You know who I am talking about.
Python has been used to great effect in web development, data analytics, machine learning, data science, data engineering, and even machine learning and artificial intelligence. You can't corner python to one domain.
On top of all this, the developer community for python is THE BEST. They are in millions, whatever hurdle you run through while programming, there's a high chance that someone else from the community had the same trouble. A simple google search would reveal the answer for it. Python has such powerful community.
And the 'Hate' part?
You would think a language this versatile and powerful, who would hate it, right? Well there's a huge community out there against this language. Let's see why.
Simplicity
Wait, how is this a con? Yes, it is. Some days ago, I found this meme in dev.to while reading an article
That's how easy it is to code in python, because of its dynamically typed interpretation design. But that same pro becomes a con, during error identification. Python programmers face several issues regarding the design of the language. This language requires more testing and also it has errors that only show up at runtime this is because the language is dynamically typed, unlike C++ or Java that spits out errors during the time of compilation itself. The same simplicity that makes this a great language, brings it some hate too.
It can indeed be a problem. Its syntax is very simple which makes a programmer more of python person and because of which they might feel code of harder language like Java unnecessary.
Speed
This right here is the biggest trump card that anti-python side draws during an Interpreted vs Compiled language debate.
I ran through this interesting article the other day. In this, the author performs a speed comparison between three fairly famous languages - Python, C and Java by executing a 2048 x 2048 matrix multiplication. Based on his test results, C is 2.34 times slower than Java and Python is 33.34 times slower than Java.
This clearly tells us how the Python stacks against it's competitors and why programmers of other languages shed some hate on the language.
Let me leave you with this
There may be a lot of cons for python and speed being the biggest of all the cons, it need not be a con at all. As I said earlier, the use case matters. If you want to code faster and push the product into production in two week time frame, choose python. If you want your application to be faster, choose other languages like Java. Python need not be slow, it could still be supported with concurrency, that increases the speed of execution multi-fold. And I think that the hate python is getting for its performance is not justified properly. If you want to build the fastest application out there, choose assembly language. Why even bother with Java, in the first place? Whatever language you choose, there's always a better and faster one out there. So, lay your use case right and choose the correct language. Speed of the language is not always a good measure of what the language could actually do.
Also, Python 3.11 just got released, which is dubbed to be about 64% faster than it's predecessor. My boy is improving with every version. Have a peek into it's new features. That's all for now, see you in the next post. Cheers !
Top comments (0)