Live data from Hacker News

Ask HN: Why Did Python Win?

news.ycombinator.com

61–70 of 162 posts

Re: Ask HN: Why Did Python Win?

#61
Python ultimately won because of its community.

The Python leadership group is friendly towards beginners and people with non-traditional backgrounds, and they actively reach out and recruit those folks to participate. It's also one of the least toxic developer communities I know of.

That matters a lot in a field like data science or cybersecurity, which has a lot of people who don't have traditional SWE backgrounds.

The language is pleasant and readable to use and has a lot of features built in, which Perl did not, but I think that's much less critical than the network effect of being a (1) welcoming and pleasant community who (2) actively recruits new fields of people.

Re: Ask HN: Why Did Python Win?

#62
I often consider how many total human lifetimes must have been spent on nothing other than dealing with and/or mitigating something as seemingly banal as Python versioning & dependency management or line ending encoding snafus.

After all these years, I assume it must measure in the tens to hundreds of thousands?

It’s in those moments of consideration that I understand humanity hasn’t done a very good job grappling with its frailty and mortality. If we had, then we’d have a crowned a winner that didn’t subjugate us endlessly to the most vapid and Sisyphean aspects of programming. Python is a lesson in managing existential angst, which I now assume was the point of it from the very beginning.

Re: Ask HN: Why Did Python Win?

#63
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...

Re: Ask HN: Why Did Python Win?

#64
Python won because Google picked it over perl in the early 2000s, declaring that it was more uniform in having one preferred way to do things rather than allowing (in contrast to Perl) programmers having a zillion ways to do things.

Larry Wall, creator of Perl, coined the phrase, "make the easy things easy, and the hard things possible". But the things perl made easy were not always things that the market needed. Perl was very distrustful of enterprise disciplines and the perl culture "let a thousand flowers bloom" mentality (which they/we called "There's more than one way to do it"/(TMTOWTDI)) was not actually useful for organizations maintaining larger code bases/systems with large groups of mixed skill level people.

Python threaded that needle of centralizing a right way to do things (not just whitespaces) more effectively.

I also observed Scala suffering from similarly disfunctional "TMTOWTDI" dynamic in organizations I belonged to; different people had wildly different styles of solving even basic problems and it really made code hard to maintain even in smaller organizations where people came and went and new people were onboarded frequently.

Plus data science use cases saved Python's web/scripting lifespan in a way slightly analogous to AI/CUDA extending NVidia's 3D graphics-centric roots. (Although the python data science ecosystem nowdays does have some TMTOWTDI weaknesses that remind me of perl/cpan's choices of web development frameworks of the mid-2000s!)

Re: Ask HN: Why Did Python Win?

#65
I think an underrated aspect of Python's success is that is easier for non-SWE professionals to understand and use. Python is popular among software developers, but it is overwhelmingly popular among scientists.

Re: Ask HN: Why Did Python Win?

#67
I started my data analysis journey using Perl and then Python. Perl had also a variety of libraries, online classes from O'Reilly's, samples online, CGI support, I moved to Python when installing some dependencies became troublesome and Perl versioning was not compatible between each other don't recall the details, since then been using Python extensibly since 2.7

Re: Ask HN: Why Did Python Win?

#68
Perl was my introduction to web programming in the 90s, and then I moved onto python and php.

Perl’s alien syntax and how there were multiple competing “best practices” put off newcomers and made it difficult to code review.

Perl also stagnated for quite some time due to the efforts to move to Perl 6, though python likewise stalled later it already had better traction at that point.

However I’d argue that Perl lost to PHP at least as much as it lost to python. PHP was revolutionary at the time for how easy and straightforward it was to do simple web programming which was one of the big use cases for Perl.

By the early 2010s there wasn't much of any use case that made sense to choose Perl. Sysadmin scripting was clearer to review and maintain in python and golang, web applications moved to php and frameworks written in languages that didn’t have the downsides of Perl.

Re: Ask HN: Why Did Python Win?

#69
post #30

> 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’…

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.

Re: Ask HN: Why Did Python Win?

#70

pytorch, langchain, streamlit, fastapi, and on and on ... There are many clear reasons imo.

If you look at https://www.tiobe.com/tiobe-index/ , Python's growth really started in 2018 which was before langchain, streamlit, and fastapi.

May be that Python 2 to Python 3 migration was holding it back but it is remarkable that it shows positive strides or was relatively stable even within that transition period. https://www.tiobe.com/tiobe-index/python/
Post reply on HN