It took the programming community a couple of decades to appreciate Python.

But until when will that trend continue?

When will Python eventually be replaced by other languages, and why?

Why Python is not the programming language of the future

Given the size of StackOverflow, this is quite a good indicator for language popularity.

It’s free, every week, in your inbox.

Almost 14% of all StackOverflow questions are tagged python, and the trend is going up.

Diagram of popularity of Python, C#, C++, Java, JavaScript, and R, from 2009 to 2020. Python is highest from 2018 onwards.

And there are several reasons for that.

Its old

Python has been around since the nineties.

That doesnt only mean that it has had plenty of time to grow.

Article image

It has also acquired a large and supportive community.

Simply because somebody will have already encountered your problem and written something helpful about it.

More than that, the syntax of Python is very human-readable.

Whitespaces make code more readable, but less maintainable. Photo by Irvan Smith on Unsplash

For starters, theres no need to specify the data punch in.

This is a huge edge for beginners.

And if youve ever had to read Python and C++ code side-by-side, youll know how understandable Python is.

Diagram of popularity of Go, Rust, and Julia, from 2009 to 2020.

Even though C++ was designed with English in mind, its a rather bumpy read compared to Python code.

These days, you’re able to find a package for almost everything.

Want to crunch numbers, vectors and matrices?

NumPy is your guy.Want to do calculations for tech and engineering?

Use SciPy.Want to go big in data manipulation and analysis?

Give Pandas a go.Want to start out with Artificial Intelligence?

Why not use Scikit-Learn.

But like every technology, Python has its weaknesses.

Speed

Python is slow.

Like, really slow.

There arevarious reasonsfor that.

And lots of memory usage translates to lots of computing time.

Another reason is that Python can only execute one task at a time.

In comparison, your average web web client can run a dozen different threads at once.

And there are some other theories around, too.

But at the end of the day, none of the speed issues matter.

Computers and servers have gotten so cheap that were talking about fractions of seconds.

And the end user doesnt really care whether their app loads in 0.001 or 0.01 seconds.

Scope

Originally, Python was dynamically scoped.

Thats why most modern programming languages use static scoping.

Python tried to transition to static scoping, but messed it up.

Usually, inner scopes for example functions within functions would be able to see and change outer scopes.

In Python, inner scopes can only see outer scopes, but not change them.

This leads to a lot of confusion.

Lambdas

Despite all of the flexibility within Python, the usage of Lambdas is rather restrictive.

Lambdas can only be expressions in Python, and not be statements.

On the other hand, variable declarations and statements are always statements.

This means that Lambdas cannot be used for them.

This distinction between expressions and statements is rather arbitrary, and doesnt occur in other languages.

Whitespaces

In Python, you use whitespaces and indentations to indicate different levels of code.

This makes it optically appealing and intuitive to understand.

Other languages, for example C++, rely more on braces and semicolons.

While this might not be visually appealing and beginner-friendly, it makes the code a lot more maintainable.

For bigger projects, this is a lot more useful.

But not many mobile apps are being developed with Python.

That doesnt mean that it cant be done there is a Python package called Kivy for this purpose.

But Python wasnt made with mobile in mind.

Some widely used programming frameworks for mobile include React Native, Flutter, Iconic, and Cordova.

To be clear, laptops and desktop computers should be around for many years to come.

Runtime Errors

A Python script isnt compiled first and then executed.

Instead, it compiles every time you execute it, so any coding error manifests itself at runtime.

This leads to poor performance, time consumption, and the need for a lot of tests.

Like, a lot of tests.

This is great for beginners since testing teaches them a lot.

But for seasoned developers, having to debug a complex program in Python makes them go awry.

This lack of performance is the biggest factor that sets a timestamp on Python.

All of these languages excel in yet-to-come technologies, most notably in Artificial Intelligence.

This article was written byAri Jouryand was originally published onTowards Data Science.

you’re able to read ithere.

Also tagged with