My opinion: Python may not be the best at everything it does, but it’s in the top 3-5 languages in the following areas:
- Very easy to install, write and understand
- Great libraries for a lot of applications
- Large community, lots of people with experience in it
It will always be a practical choice for those reasons. There are probably a lot more as well that I can’t think of at the moment.
Very easy to install
This has to be a joke.
Yeah, thought the same. Python isn’t intuitive to install new packages.
The libraries part is enormous. Researchers just pull up math engines, database access is a breeze, and so on.
You got a specific need, there is a library for it. It’s like C/C++ without the hassle.
Python is popular because it’s whitespace based syntax make noobs think it’s easy to read. This and it’s pre-installation on Linux made it popular amongst academics who embraced it for data analysis. This lead to a lot of data scientists embracing it and writing libraries for it which created a virtuous cycle in that arena.
And it’s a damn shame because Python, and it’s whitespace nonsense and lack of type system, is a horribly impractical language for building anything at scale.
It’s not made for scale. Use C/C++ or something if you want scale.
Or you know, TypeScript, Go, C#, Java, Swift, etc. etc.
Python isn’t great at anything except for having a lot of data science libraries already written for it.
Not only data science libraries, there is a library for about anything. Which is not the case for your list of languages.
Edit: not all languages in the list.
When you understand how python works, it’s quite simple to use too, and has lot less clutter than say java or c#.
Not only data science libraries, there is a library for about anything. Which is not the case for your list of languages.
Java has an excellent ecosystem for libraries. And a much more mature one in most cases than Python. The Spring framework alone is simply amazing.
Go’s ecosystem is pretty good as well and getting better.
When you understand how python works, it’s quite simple to use too, and has lot less clutter than say java or c#.
The problem is that many python devs consider things like “type hints” and “classes” to be “clutter”. It takes a lot of discipline to write managable python. Being “newb friendly” is a curse. “stringly typed” crap does NOT scale well.
It can scale though. It parallelizes really well if you use queuing systems to distribute the load. You just have to make sure that the hot loops are in C/C++, and it is very easy to interface with compiled binaries via the C API.
It can scale though.
So can assembly. But it takes a tremendous amount of discipline.
Python’s curse is that it’s popular with “newbs” who think it’s okay to use dictionaries for everything and that type hints are “clutter”.
Agreed. I have seen a lot of Python code that was really painful to massage back into a more structured object hierarchy. Java certainly does a bit better in that respect, and as a language, it does a much better job of encouraging better practices, but I think it’s also largely due to the kinds of people that use those languages as well.
Instagram runs on django.
It does make it easier to read. We primarily use indentation to match brackets, so clearly, indentation is the most important readability feature between the two, not brackets.
Try reading the same piece of code: without brackets, and then without whitespaces and tell me which is better.
Whitespaces as syntax force you to indent your code properly and not be misleading.
I literally do that professionally, and I’m telling you that brackets are inarguably better.
You are used to whitespace; I have literally spent months refactoring and upgrading a react frontend and a python backend and am telling you that brackets are a single character and far more predictable, and then your IDE / Linter / Formatter can reliably use them to fill in the perfect indentation and whitespace.
My first professional language was Python, but I have since tried a half dozen others and would never choose to go back to a whitespace based language unless there was a good reason.
I’ve written C, JS, PHP, and a few others. Today I write Python almost everyday and wouldn’t trade it for any of them. Maybe Rust, but not because of brackets.
Brackets are infinitely easier because any IDE (and most text editors) have a dead simple linting plugin which auto indents for you and lets you know when you fucked up. Your editor can barely do anything with whitespace only because everything is valid syntax.
Also lemme take this opportunity to say fuck yaml for exactly this reason.
Instagram’s back bone is written in python. I’d say that’s pretty scaled.
No, it’s not. It was rewritten in Facebook’s version of PHP when they bought them.
Here’s a blog post from meta, they introduced immortal objects to python to help with their Instagram scaling.
https://engineering.fb.com/2023/08/15/developer-tools/immortal-objects-for-python-instagram-meta/
Huh, TIL, I didn’t realize they kept the gateway servers in Python.
It’s kind of crazy how problematic pip is, though. There are enormous ecosystems like conda, poetry, arguably Docker all built around “pip not working right.”
I see so many people want to install vllm or something with like a 95% crash and burn rate if they aren’t already proficient with Docker, complete with the spare disk space to basically ship a whole other machine.
Meanwhile, massively complex Rust or Go or whatever packages… just work. With the native tooling, for me.
To be clear, I like Python, and I believe many issues can be smoothed with time (like improving its JIT and maybe encouraging more typing in codebases). But pip and its ecosystem are forever cursed.
pip is easily the worst thing about Python. But now that we have
uvI would say the worst thing is the package/import system. I’m pretty sure only 1% of developers understand it, and it only really works properly if your Python code is a Python package.If you treat Python as a scripting language and just scatter loose files around your project and run them directly, it doesn’t work at all. Pain everywhere. Which is dumb as fuck because that’s like 80% of how people use Python.
Ugh yes I hate the import system too. I have to look it up every time and still don’t understand it, and it’s a hair away from messing up existing projects to the point where sometimes it does.
I want to love uv, but:
-
It breaks some random compiled C packages. I ran into this the other day, and the associated issue on the package was basically “shrug we see it’s breaking, this dev is doing some weird shit”
-
I’d prefer to use the optimized/patched build of Python CachyOS provides (and the optimized Python compiled system packages), though this is largely OCD.
-
It’s not optimal for some PyTorch stuff, which is its own little ecosystem nightmare
-
I’m glad it’s not just me lol every so often I’ll think “I haven’t done a python project in a while I’ll try FastAPI” or something and I have so many issues just getting the env set up.
It’s so ridiculous that many projects don’t even support pip+venv (much less system python packages. shivers). They literally check if that’s what you’re trying and pre-emptively fail.
Some projects become impossible to run in any combination because some dependency (looking at you, sentencepiece) no longer works outside a narrow set of circumstances, unless you hand build some obscure github PR, disable all the dependency checks and cross your fingers and hope the wheel builds.
And I’m sorry, but I don’t have 200GB of space, tons of spare RAM, and an intricate docker passthrough setup for every random python project. I just have like four different 3rd party managers (conda/mamba, uv, poetry… what’s the other one? Ugh)
uv. Is like cargo for Python.
It doesn’t work with some projects, unfortunately.
I think it’s just because it is always recommended as an “easy” language that’s good for beginners.
The only other thing it has going for it is that it has a REPL (and even that was shit until very recently), which I think is why it became popular for research.
It doesn’t have anything else going for it really.
- It’s extraordinarily slow
- The static type hints are pretty decent if you use Pyright but good luck convincing the average Python dev to do that.
- The tooling is awful.
uvis a lifesaver there but even withuvit’s a bit of a mess. - The package system is a mess. Most people just want to import files using a relative path, but that’s pretty much impossible without horrible hacks.
- The official documentation is surprisingly awful.
- Implicit variable declaration is a stupid footguns.
The actual syntax is not too bad really, but everything around it is.
syntax is bad for list operations, also there are situations where you need to count the number of parentheses you closed, which wouldn’t happen of you were able to use fluent interfaces
I think it’s just because it is always recommended as an “easy” language that’s good for beginners.
The only other thing it has going for it is that it has a REPL (and even that was shit until very recently), which I think is why it became popular for research.
If that’s the case, then why didn’t Javascript take its place instead? It’s arguably even better at Python in both of those areas…
I think Python is superficially easier since you don’t have to declare variables, printing is a little easier, etc. And in some ways it is actually easier, e.g. arbitrary precision integers, no
undefined, less implicit type coercion.But I agree JavaScript is generally a better choice. And it is actually more popular than Python so…
The blog gives a few vague answers, none of which shed any light on how Python became so popular. If I had to guess, much of it’s popularity came from being embraced as a data analytics tool – which is honestly a great use case for an interpreted scripting language – and its subsequent adoption by academia, introducing it to an entire generation of CS grads.
Python has advantages and drawbacks like any programming language. It’s not my favorite language and it’s not my least favorite. It’s not going anywhere anytime soon.
From an administrator POV, python is great for scripting, automation, and AWS boto work.
Because most people are lazy hacks.
Nah, I recently had to create a program that turned a bunch of extracted CSV files into an XML file for government reporting. I also had to parse some provided government XML files to add things into my output.
This was going to be run by non-technical people on any OS so I went for python because “install python, download this file and click on it” was easy. Python has a big standard library so I could do everything I needed in it. I was considering using Go but asking people to open the terminal and build something was probably a bridge too far.
I use it as a beginner cuz it’s easy to use but guess I’m lazy since I didn’t start on a language that’s more in depth
As a beginner, you’ll eventually run into enough issues with your code that you will start to ask “is there a better way?” My answer will be: yes. Strongly typed languages are FAR superior because they force you to make your code robust and eliminate most runtime errors by default. You’ll eventually come around (unless you’re in a company with a hack culture or are surrounded by hacks that don’t know any better).
I started using it as an alternative to Octave/Matlab and Perl. Python is better at general programming than Octave/Matlab, and better syntax than Perl (IMO) while being almost as easy to do the same stuff I was using Perl for. It’s very good for quickly writing small scripts. Issues can arise on large projects/teams because of stuff like type safety, and it also has issues with performance.
In the Python documentary they mention the early creation of numeric as an alternative for closed options like Matlab; which led to Python being used in the sciences and data processing. Then later it became the natural choice for machine learning in the early 2010s and the AI explosion of 2020+.
I’d say libraries is why it is popular. Also, I’m not a Python developer, and I don’t bother with libraries.
Python is one of 4 key programming languages in world. C as a systems/performance/building block language (which I get has competitors). Javascript for node performance and web language. J as being the most powerful syntax/paradigm and best designed language.
Python has to be the most important due to all of the support it has, including C++ and other building block language/library imports that allows it to be the LLM integrator choice. A field that moves so fast, you couldn’t import libraries fast enough in another environment. Another shoutout to J is that its terseness is a good LLM fit due to less token consumption. But integrating with python is essential.



