Live data from Hacker News

Ask HN: Why did Python win?

news.ycombinator.com

811–820 of 856 posts

Re: Ask HN: Why did Python win?

#811

Earlier quoted context omitted.

You are mistaking syntax for features. C++ got popular because it managed data structures under the hood automatically. I.e, you didn't have to keep track of memory offsets or function pointers. Java got popular because it did that and also managed memory allocation under the hood automatically. Python (and Javascript) got popular because it did all of that and also managed types under the hood automatically. The fut…

The discussion isn't about C vs Python, it's about why Python won over Ruby, a language at a similar level of abstraction. Ruby is arguably even less burdensome because in many cases the libraries/frameworks do a lot of magic that would be unpythonic.

AFAICT, Python won over Ruby because the support was largely in English, not Japanese, and because English is the language of global science and commerce and Japanese is the language of…Japan. Boosted by Python having a much better experience on the most common desktop environment (even though Python also favored Linux and, IIRC, other Unix-ish environments); Ruby experience on Windows eventually got tolerable, but even now that’s largely because there is a third-party project providing the main Ruby-on-Windows installer.

The overwhelming advantage in ecosystem breadth and depth it had for this reason was insurmountable, even once Rails drew more attention to Ruby. There’s a whole bunch of technical advantages and disadvantages of each when you look at the language and core implementations, but I don’t think they were really the factors that led to the different relative popularity of the two.

Re: Ask HN: Why did Python win?

#812

Python ended up 'specializing' in data contexts, thanks to Numpy / Pandas, and as a result, ended up becoming the first exposure to programming than anyone doing data stuff had. That was millions of people. In that space, it had no competitors. Ruby ended up 'specializing' in web dev, because of Rails. But when Node and React came out, Ruby on Rails had to compete with Nodejs + React / MERN as a way of building a web…

I think Python was popular as a general-purpose language first. After all, there was a reason people put so much effort into writing Numpy in the first place. I think a lot of people were attracted to the language design, as captured in the Zen of Python ( https://peps.python.org/pep-0020/ ), such as: Explicit is better than implicit. Readability counts. Errors should never pass silently (unless explicitly silenced)…

> There should be one-- and preferably only one --obvious way to do it.

It looks too late for 3.13[0]

Maybe they can channel the BDFL in the Packaging[1] thread for version Pi.

[0] https://docs.python.org/3.13/whatsnew/3.13.html

[1] https://discuss.python.org/c/packaging/14

Re: Ask HN: Why did Python win?

#813
post #618

Earlier quoted context omitted.

> [...] the perl6 debacle did a lot to convince people that Perl was kind of a dead end. Not GP, but the Python 2 vs 3 holy wars were also something that kept me from adopting Python as a scripting language a couple of years.

Yeah, python 2->3 transition was painful. But, I would argue that was self inflicted. Guido and company chose not to develop a 2.8/2.9/etc series where people could move their code base over incrementally. I mean, I love python, but that sucked! Yes it would have been more work for the devs, but the amount of work it meant for the users were worse. In fact they pretty much just threw away anything before python 3.6 a…

[dead]

Re: Ask HN: Why did Python win?

#814
post #465
post #366

Earlier quoted context omitted.

But Ruby took all the best bits of Perl so I'm still perplexed as to why Python "won".

Because the best bits of Perl were kinda trash that Python was smart to avoid.

Funny, because 99% of current regex libraries use Perl's regex extensions.

Re: Ask HN: Why did Python win?

#815
post #163

Earlier quoted context omitted.

People like to hate on PHP (and to be honest I really never enjoyed it), but there was a time when if you wanted to build powerful, large scale websites (or hosting, or scalable web farm deployments) it was the most reliable and performant thing short of Java. It also helped that the PHP ecosystem had some pretty solid and battle tested HTTP components and pretty productive frameworks--server-side rendering with Varn…

The things PHP had that made it win (for a while) was that it was easy to set up and configure for a hosting environment (Apache plus modphp worked out of the box consistently) and the HTML first design made it easy to add to static web pages, whereas forms and CGI was multiple steps and more confusing for less experienced devs.

Agreed. The one thing PHP demonstrably did better than other langs (other than be a simpler Perl) was be web-first.

Other langs assume you could be doing anything, and here's the extra steps necessary to make it serve pages. PHP assumes the reverse.

Re: Ask HN: Why did Python win?

#816

Python ended up 'specializing' in data contexts, thanks to Numpy / Pandas, and as a result, ended up becoming the first exposure to programming than anyone doing data stuff had. That was millions of people. In that space, it had no competitors. Ruby ended up 'specializing' in web dev, because of Rails. But when Node and React came out, Ruby on Rails had to compete with Nodejs + React / MERN as a way of building a web…

I think Python was popular as a general-purpose language first. After all, there was a reason people put so much effort into writing Numpy in the first place. I think a lot of people were attracted to the language design, as captured in the Zen of Python ( https://peps.python.org/pep-0020/ ), such as: Explicit is better than implicit. Readability counts. Errors should never pass silently (unless explicitly silenced)…

> Readability counts.

In what way is numpy readable?

Re: Ask HN: Why did Python win?

#817
Interesting to note the progression:

Python was initially another scripting / better shell to rival Perl, but it took a long time to do so. It didn't really become popular until way later than a lot of other languages. I think this was mainly due to it's libraries, lightweight for beginners and being used in all kinds of different places. Ruby was really only know as "with Rails" for a lot of people and there are a lot of use cases other than web dev.

C 1972

Bourne Shell 1979

Perl 1987

Python 1991

Javascript 1995

Ruby 1995

Java 1995

Re: Ask HN: Why did Python win?

#818
post #720

Earlier quoted context omitted.

So I imagine you have that perspective because you started less than 20 years ago. In some ways the idea of the Pythonic Way to do things evolved in opposition to Perl's vigorous advocacy of More Than One Way. Python has been really winning for some time, so it's natural that its ideological discipline has grown ragged. The crop of kids who value options above consistency don't have the scars of the Perl age to infor…

> There should be one-- and preferably only one --obvious way to do it. I just wish Python applied this approach to package management. It is needlessly complicated.

The obvious part is definitely lacking, but the long and short of it is basically to ignore all the newfangled solutions. They are much more trouble than they are worth. Just use pip with a venv and a requirements.txt (easier) or a pyproject.toml (cleaner).

I really fail to see what the newer tools actually bring to the table. From my experience they solve no actual problems and just introduce more bugs and weird behavior.

Re: Ask HN: Why did Python win?

#820

What concepts does a language force a new user to be aware of, and how reliable are user's first intuitions about those concepts? I would argue that Python dominates Ruby in this metric. New users wonder how to call functions. They form an intuition ("use parenthesis"), but it's unreliable. "Oh, parenthesis are optional--oh, parenthesis are only optional sometimes". New users wonder what a function is exactly. They f…

I'd argue that better relative ergonomics had diddly squat effect on Python's current position. It's first mover advantage, plain and simple. It got its hooks in data science like JavaScript got its in the browser. I can say that personally using Ruby, Python felt like a massive step backward. I can see how others might disagree, but I feel like it's all in what you know first. On a certain level, most of us know Jav…

For the case of Javascript, (I think) it followed "Worse is better" principle. It's been trying to be as practical as possible. And it's everywhere even though it was not really great (until new standards and Typescript come). So a new joiner would pick Javascript so he/she can have a wide choice of possibility later.

Same things are happening with Python. And if I have to be honest, if I come from a different profession and want to change my career, I would pick either Python or Javascript for my first step.

Post reply on HN