Ask HN: Why Did Python Win?
85 comments
·December 22, 2025spenrose
1. Python was designed by testing syntax with novice users to see what they could adopt easily.[1] > 90% of current Python users weren’t born when it was created. They all had to learn, and Python is the easiest language to learn because Guido and his teammates, unlike $LANGUAGE_DESIGN_GOD, approach the problem as experimental scientists rather than auteurs.
2. Python is conceptually compact, dominated by hash tables with string keys. The initial leader in the ecosystem, Perl, is conceptually sprawling and difficult to reason about.
3. Python also took lessons from the Unix shell, a mature environment for accommodating beginners and experts.
4. Python had a formal process for integrating C modules from early on.
5. Python’s management has an elegant shearing layer structure, where ideas can diffuse in from anywhere.
6. $NEXT_GENERAL_PURPOSE_LANG (Ruby, Go) weren’t enough better to displace Python. Both were heavily influenced by Python’s syntax, but ignored the community-centric design process that had created that syntax in favor of We Know Best.
7. Speaking of open source entrepreneurialism, JavaScript has become a real rival thanks to the Web (and node), but it is handicapped by the inverse failure mode: where Go is dominated by a handful of Googlers, JavaScript was effectively unmanaged at the STDLIB level for a crucial decade, and now it can’t recover. (I’d also guess that having to write a module system that works well in the chaos that is Web clients and simultaneously the Unix world is a daunting design problem.)
8. Python got lucky that data science took off.
[1] https://ospo.gwu.edu/python-wasnt-built-day-origin-story-wor...
spenrose
I forgot two, er, three:
9. Python got lucky that its inevitable screwups (Python3) didn’t quite kill it.
10. Swift and Kotlin both define programming as serving the compiler (specifically LLVM) rather than serving the coder’s problem. (I haven’t discussed Rust so far since it isn’t attempting to compete with 98% of Python use cases, but if you squint you can see it as going one step further than Swift and Kotlin and in effect forcing the coder to be a sort of human compiler who thinks in types and memory management. This is not a criticism of Rust, BTW.)
0. And behind all of this is Moore’s Law and the demographic explosion of programmers. Python was an implicit, perhaps unconscious bet that if you served people thoughtfully, the tradeoffs with serving the needs of contemporary silicon wouldn’t matter as much.
spenrose
I can't stop thinking about this. WRT Perl specifically, it’s fascinating how the two competitors adopted Unix shell patterns. Python is handicapped to this day by not automagically snarfing up environment variables, etc. But Perl leaned hard into TECO-style gibberish and the meta-syntax that is regular expressions, confronting beginners with arbitrary complexity. It feels like Wall embraced the system administrator side of coding — the side that has an enormous capacity for tracking corner cases and managing impedance mismatches. Wall was trained, perhaps not coincidentally, as a linguist, a field where continent facts really matter. Guido, on the other hand, was an accomplished mathematician. (This is the Dwarf / Elf distinction from Cryptonomicon.)
LexiMax
I feel like if #1 was done today, there is no way on god's green earth that whitespace would be used for code blocks.
It is far and away the most common footgun novices run into when I'm answering questions about why their code doesn't work.
kemayo
It's hardly "inexplicable"... particularly if you're comparing it to Perl, a famously hard to read language.
* Python has clean and readable syntax that a complete beginner can understand -- it's really close to the pseudocode you might use for teaching.
* Python has a good standard library, so you can do a lot before you need to work out how to install more (and, reproducibility concerns aside, `pip install` is really simple once you get there)
* Because it was easy to pick up and easy to use for teaching, it took over some niches like stats in academia / data-analysis, where the people doing the work aren't professional programmers but just need something they can hack together. Once NumPy existed, people had minimal incentive to move away.
(Insert Marge Simpson "I just think it's neat" gif here.)
netcraft
I think the reason python won was that it was easy to learn and read and was batteries included. vs perl: People need to solve their problems, not fight with syntax
Theres a lot of network effects as well. The more people were using it, the more people will use it.
fud101
Perl had the batteries and it had CPAN. Python borrowed the best bits of Perl and enjoyed a reputation which overlooked its many flaws. If it had been scrutinized as much as Perl, we'd have realized it was just as bad but in different ways.
theamk
This makes no sense.. Python _was_ heavily scrutinized when it was introduced - the whole "Perl vs Python" comparison was pretty popular for a while, with either of those being declared winner, depending on the author.
If there is really a killer argument for Perl over Python that was overlooked in all those years, why don't you say that argument, or even better, write a blog post explaining why Perl is better than Python? Then we could discuss that instead of nebulous "different ways"/
fud101
Perl had charm, it was respected by hackers for the joy it brought people who 'got' it. It still remains a beautiful language that I regret not learning due to having a superior taste. Python had none of it. I still don't understand how it won, stealing the halo of a language while having nothing of the sort. The only argument you can make is boring is better imho.
kllkhaslndfjn
[dead]
madduci
I don't believe the "syntax win" scenario. Python is also ugly, due to the required indentation, like yaml.
I believe more in the ecosystem, specifically how the computer vision and machine learning movements have adopted python extensively as frontend language (the heavy weightlifting is still doing in C++). The exploit of numpy has brought many many use cases into the language as well.
loloquwowndueo
Indentation is there regardless, and is increasingly enforced by format-checking tooling which is more commonly an out-of-the-box offering for many ecosystems (gofmt).
So why not make it have syntactical meaning since it’s already there in 99% of cases?
It does feel weird at first but honestly it’s not something you’ll think about much after a while.
Joker_vD
> don't believe the "syntax win" scenario. Python is also ugly, due to the required indentation, like yaml.
That's like, your opinion. Python was explicitly designed being easy to learn, borrowing heavily from ABC, which actually experimented with different syntaxes to see what works and what doesn't. The indentations apparently helps a lot with this, along with ':' before the introduction of indented blocks.
evgen
That 'ugly' required indentation and whitespace also made Python easier to read, especially for newbies and casual coders. A standard visual structure and a syntax that is pretty close to executable pseudo-code lowered the barrier to entry for a lot of people and made Python feel 'approachable'. This perception that it was easy to use helped increase the network effects other have noted.
randallsquared
> Python is also ugly, due to the required indentation, like yaml.
The fact that YAML also won in its configuration file niche doesn't give you pause?
gbalduzzi
It's not about being beautiful or ugly, it's about being simple.
Python is simple to read / write and easier to reason about, especially for people that need a programming language to solve a problem but are not software engineers.
The reason it won, especially in data analysis, is because most data analyst are/were not software engineer and Python feels more natural to people.
The indentation is not a big problem when a decent text editor is used
juujian
I was not exposed to much code before trying Python 2, and I always thought of the indentation and newlines as aesthetically pleasing and helpful. Same for yaml actually. Would argue that preferences on indentation etc. are just an acquired case.
f33d5173
> Python is also ugly, due to the required indentation
As opposed to the not required indentation that literally everyone who writes code ever does anyways?
> believe more in the ecosystem, specifically how the computer vision and machine learning movements have adopted python extensively
What came first, the chicken or the egg?
markus_zhang
Even for someone who has used more than one languages, I think Python is fine. It’s a lot prettier than the academic-HN preferred lispy languages.
dpark
> If you survey the language landscape now, a language can be much better than Python but never get the chance Python did just because it happened to look a bit better than Perl. Which is absurd to me.
You’re struggling to understand Python’s success because in your head the primary reason Python succeeded was because it happened to be prettier than Perl, and you can’t wrap your head around why that’s enough. But it’s not enough. Python succeeded for many reasons.
fud101
My gut feeling is that it succeeded due to escaping scrutiny. I had heard enough critiques of the language from CL folks but the rest of the world was just happy to get a nicer Perl that could be used to glue together C code into useful apps and scripts.
dpark
With respect, lispers are probably not the best people to ask how to make a widely adopted language.
Regardless, you’re regurgitating exactly what I said. Your gut is that Python was just a slightly better replacement for Perl. This is at best one dimension. If you can’t broaden your perspective, then this thread full of examples and arguments for why Python became popular will be lost on you.
If you’re so confident in your assessment, why did you bother to ask?
markus_zhang
Yep folks just need some glue languages that doesn’t require a lot of time to learn. Python fits the bill perfectly.
BeetleB
> My gut feeling is that it succeeded due to escaping scrutiny.
You keep saying it, but from 2000-2010, what scrutiny did it escape, exactly?
Are you saying when universities dropped Java/C++ for the introductory course and replaced it with Python, they simply threw dice to pick the language?
Are you saying all the Perl programmers who kept saying "Python will never have the power of CPAN" didn't exist?
Are you saying Eric Raymond never wrote an essay on the virtues of Python?
networked
Previously:
- Perl's decline was cultural - https://news.ycombinator.com/item?id=46175112 - Dec 2025 (460 comments)
- (!) Ask HN: Why did Python win? - https://news.ycombinator.com/item?id=37308747 - Aug 2023 (839 comments)
- Ask HN: Why is Python so popular for ML/DS? - https://news.ycombinator.com/item?id=16207834 - Jan 2018 (19 comments)
- Ask HN: Is Python dying? - https://news.ycombinator.com/item?id=11100251 - Feb 2016 (352 comments)
- Python is now the most popular introductory language at top U.S. universities - https://news.ycombinator.com/item?id=8001337 - July 2014 (362 comments)
- Ask HN: Why Python over Ruby? - https://news.ycombinator.com/item?id=682101 - July 2009 (196 comments)
- Ask HN: What does Ruby have that Python doesn't? - https://news.ycombinator.com/item?id=283639 - Aug 2008 (223 comments)
nromiun
Because not many people prioritize syntax design like GvR. Even now if someone releases a new programming language most people will ask what features it has, how fast it is, how fast is the package manager etc. Because these questions are simple yes and no ones. Unlike syntax design choices.
Even if they ask about the syntax design people just dismiss their question with saying "syntax is not important". Python did the opposite, it focused on syntax over everything else. That caught on with beginners and now here we are.
Of course with AI Python got even more popular, but even before ChatGPT was released it was already dominant.
biasafe_belm
You can't only look at it from the perspective of a software engineer. Ordinary people can read and write Python much more easily than a ton of other languages. It's very easy to get started, with basically no ceremony. Highly tolerant of user errors yet still allows one to grow with the language (nobody writes ABCs on their first day).
Python has issues, but those issues don't matter equally to everyone and every use case. Low barrier to entry, coupled with Metcalfe's law, explains a lot IMO.
I love Scheme, but not everybody does, and I can see why.
cyanmagenta
There is a network effect with programming languages. Once you get popular, more people write libraries and guides for that language, which in turn makes it even more popular.
If you were czar of the universe and could start from scratch, could a better scripting language be created? Sure. But that’s not the fact pattern, and Python isn’t bad enough at what it does to warrant starting over.
lizknope
Nothing against Python but I still use Perl 5 because it works for what I need to do.
The Perl 6 redesign was announced in 2000 and it has been going on for 2 decades? Python is clearly a good programming language but the Perl 6 redesign took so long that many people gave up. Then it was renamed Raku in 2019 I think.
arnvald
Years ago I wrote article on this topic: https://www.notonlycode.org/why-python-has-won/
In short (all below is my opinion): it was popular in academia and got some corporate adoption, so when ML exploded in popularity it was a natural choice as the scripting language for ML tooling. On top of that it’s easy to pick up as a language, and it’s a general purpose language - there are lots of scientific tools like pandas written in it, there are web frameworks, etc.
Perl was too quirky for wide adoption and it stopped developing (Raku/Perl 6 took to long to develop), PHP was focused purely on the web, similarly JS. Ruby could have won, I like it more than Python, but outside of Japan it’s also mostly been associated with web development (because of Rails), it also lacked libraries that Python already had.
Workaccount2
Non-swe, classic engineer here
Python is easy to learn and has an extensive library catalog. It also has massive support available online. That's why I have chosen it in the past when I needed to write basic programs for work.
With the rise of LLMs, python is now even more attractive as LLMs really excel at writing it.
BeetleB
Win what?
Against Perl? Over a decade ago. 10 years ago, the only places that required Perl were either hard engineering (i.e. non-programmer EEs) or those with legacy code bases.
Over everything else? Of course not. You don't do systems level work in Python.
The problems with Python are minor (other than packaging), and not a big enough pain to adopt another language. If you really could benefit from static typing, there are already existing languages that do the job well (C++, Rust, etc).
For the majority (including even some Perl fans), switching to Python was a significantly better experience. If you now show me a language better than Python, it's really only an incremental benefit. Sure, I prefer ML languages like F#, but the vast majority don't.
I was listening to an old postcast from 2021 which discusses the inexplicable rise of Python.
I remember much of the positive sentiment around Python in the early days being less about Python and more about how powerful Perl is but Perl is Perl. Python being the nice and clean version of Perl meant it got all all the praise of Perl while enjoying the reputation of having none of the failings of Perl. In hindsight I think Python needed to stand on its own right, not just as a better Perl, but yet here we are. I think hindsight will show we should have considered the defects of Python more deeply. I know the lispers saw them but no one listens to them. Today Python is most dominant language on the planet and Perl is all but forgotten.
If you survey the language landscape now, a language can be much better than Python but never get the chance Python did just because it happened to look a bit better than Perl. Which is absurd to me.