According to TIOBE, Python has now overtaken C and Java to become the world’s most popular programming language. The high-level language has been on the rise for years, and the fact that any language is competing with Javascript, the language of the web, is a testament to its growing real-world use cases.
In recent times, those use cases have largely been data science, machine learning, web scraping and general automation. While Python wouldn’t be your first port of call for a GUI app, there’s a library for everything (and there’s a reason Python is now the most popular language).
TIOBE uses search queries to rank languages, and it largely seems to agree with IEEE‘s rankings, both of which rank Javascript considerably lower than Redmonk. IEEE’s website, however, has upside-down 8s. That cannot be forgiven.
Even Python’s reputation as a slow language has been eroded in recent times, with libraries like Cython that help compile your code into C after the first run, and better libraries for concurrency and multithreading. The latest versions of Python have begun to improve on CPython – it’s still early days in the long run, but it’s encouraging to know this will be fully supported.
It’s this kind of code conversion to a lower-level language that can speed up academic applications of Python by a thousand percent or more, combining the user-friendliness of Python’s libraries with the grunt of the lower-level languages:
But not everyone needs to dive that far in, as Python can be exceptional for automating office processes, or any kind of mundane task that feels like turning a crank. Courses and books like Automate the Boring Stuff With Python have been massively successful and probably contributed to its rise to the top. (The course is a fantastic start and I recommend it. Learning to code is empowering!)
[related_content first=”1117559″]
Python creator Guido van Rossum is hoping to improve the language’s speed by 2x or even 6x in 3.11, though he said, “We’re far from certain we will reach 2x,” and said he’s “optimistic and curious”.
Software at Scale 34 – Faster Python with @gvanrossum
We discuss:
– Why work on Python performance
– How to speed up the interpreter while maintaining backward compatibility
– Why JIT is an overloaded termand more!https://t.co/9TcxPJKFPY pic.twitter.com/OTxeMnUHyU
— Utsav Shah (@utsav_sha) October 5, 2021
Now working together with Microsoft, van Rossum is wary of the mistakes made in the decade-long upgrade from 2.x to 3. But with improvements to the interpreter, it’ll have speed benefits for anyone doing CPU-intensive tasks.
That won’t include much of the machine learning/Tensorflow crowd that leverages GPUs, or code that already uses C, such as NumPy. But it’ll still help a lot of people in the near future.