Ask HN: Why Did Python Win?
Scope of “Winning”
- Some argue Python “won” mainly over Perl and similar scripting languages; it clearly didn’t “win” systems programming or the browser.
- Others note JavaScript/TypeScript now rival or exceed Python by some metrics (e.g., GitHub contributors).
Syntax, Readability, and Whitespace
- Many see enforced indentation as Python’s killer feature: it bakes formatting into the spec, reduces bikeshedding, and makes code resemble executable pseudocode.
- Supporters say this made Python especially approachable for beginners and non-SWE users, and simpler than Perl’s dense, many-ways-to-do-it style.
- Critics find indentation-based blocks “ugly” and footgun-prone, arguing block ends are invisible and syntax alone can’t explain success. Others counter that everyone indents anyway and tools now largely eliminate whitespace problems.
Ease of Learning and Non-SWE Adoption
- Python is repeatedly described as “simple,” “batteries included,” and “good enough” for almost any task.
- Non-software engineers (scientists, data analysts, classic engineers, grad students) could read and write it quickly without deep CS background; this low barrier plus good docs and online help fueled adoption.
Ecosystem, Libraries, and C Interop
- Several comments argue the ecosystem mattered more than pure language design.
- Key eras:
- Early web/data parsing: BeautifulSoup and rich stdlib.
- Scientific computing: NumPy/SciPy, then pandas and others, using Python as a friendly front-end to fast C/C++/Fortran.
- Web: Django/Flask (and later FastAPI) made full-stack development accessible.
- AI/ML: TensorFlow, PyTorch, computer vision, and later LLM tooling (langchain, etc.) entrenched Python as the de facto interface.
- Efforts like manylinux and wheels made native binary packages easy to consume, unlike many other ecosystems.
Network Effects, Institutions, and Community
- Academic adoption and use in intro courses created generations of comfortable users.
- Corporate endorsement (notably early Google and others) helped legitimize it.
- A welcoming, beginner-friendly community and structured governance encouraged library authors and new domains.
Philosophy and Trade-offs
- Many frame Python as “boring is better” / “worse is better”: slower and imperfect, but extremely practical and cognitively light.
- Critics point to packaging/versioning pain and predict AI tools may erode the value of optimizing for perpetual beginners.