Live data from Hacker News

Ask HN: Why did Python win?

news.ycombinator.com

11–20 of 856 posts

Re: Ask HN: Why did Python win?

#11
> Python’s math libraries, numpy and pandas make it appealing to academics; Python is simpler and possibly easier to learn; Rails was so popular that it was synonymous with Ruby

Yeah, that’s basically why.

Back in its heyday, Ruby had two basic niches. The bigger one was Rails. Rails is still alive today, but after the move towards richer frontends a lot of the hype, and consequently the developers, followed that trend into the JS world. It’s obviously possible to have rich React frontends and Rails backends if you want to, but that isn’t quite what you got with “omakase” Rails.

The other niche was in devops tooling, e.g. Chef and Puppet. But that space moved towards containerization and all of that tooling, more or less, got written in Go.

Re: Ask HN: Why did Python win?

#12
To offer a slightly different perspective than just "ecosystem", I learned Ruby a few years after Python, and found it kind of annoying, in that many Ruby programmers tend to invent their own DSLs and little hacks because the language is so flexible. I know many programmers love Ruby for class_eval, but it really makes codebases hard to read, and code is read more than it is written.

Python has honestly had some opportunities to die out (2->3 transition, type hinting missteps, incredibly slow, etc.) but survived because writing extensions was always easy and it was taught a lot in universities.

Re: Ask HN: Why did Python win?

#13
post #7

No language ever won. When I started COBOL had won, not so today. Over the years various languages have won. Python is popular today for many but not all applications. That's about all you can say.

Python is clearly the current winner. Not sure being pedantic about what it means to be a winner adds anything

Re: Ask HN: Why did Python win?

#14

Python grew out of a myriad of applications that built on hard to replicate components, while Ruby relied only on web development which is remarkably subject to fashion. Python is very simple making it easy to learn. Thus, it became more and more popular for fields where programming is not the main task, like science. It is also very easy to extend with C. So, these fields could bolt on time-tested scientific code in…

> Ruby seemed to be entirely tied to Rails.

I’d be interested in going one step further and asking why that was. Rails is great, but so is Ruby, but normally a great library like Rails helps attract developers to the language. Rails is the only example I can think of where a widely popular library (ostensibly) leads to fewer users of the language for other purposes.

Re: Ask HN: Why did Python win?

#15
I often hear this kind of praise for Ruby but have never really dug into it myself. Does anyone have any links to pages that do a good job of covering some of the main selling points of Ruby in terms of syntax, features, ecosystem, etc.?

Re: Ask HN: Why did Python win?

#16
Languages that won, win, and will win are all of those that are moving towards being smart, in the sense that the compilers/transpilers infer what the programmer is trying to do and generate the appropriate code under the hood.

The future of programming is describing the majority of programs in something thats even closer to English, and then fine tuning it with something like python, all of which will result in natively compiled optimal binary.

Re: Ask HN: Why did Python win?

#17
I always thought of Ruby as Perl++ more than anything. It's relatively easy to write, not always so easy to look at and refactor later. As to why Python has won, I think you nailed it, the library integrations and academic space has made it popular and useful there.

Ruby's popularity for what it was, was heavily tied to Rails. As that space progressed, a lot of people came to dislike it as much as anything, and maybe more. There are a lot of ways it didn't work so great and those warts made more and more avoid it in future projects.

That's my $.02. I started with JS as well, but in '96 and through classic ASP (JScript and VBScript) through VB6, .Net (and C#) then into/through Node.js etc. I also dabbled in PHP, Ruby and a handful of other tech along the way. Python feels like a massive gap in my knowledge base at times, I have a few books to read, but not much in terms of opportunity/need. And the time I've spent on Python, I feel like I'd rather spend that time leveling up in Rust.

Re: Ask HN: Why did Python win?

#18

Languages that won, win, and will win are all of those that are moving towards being smart, in the sense that the compilers/transpilers infer what the programmer is trying to do and generate the appropriate code under the hood. The future of programming is describing the majority of programs in something thats even closer to English, and then fine tuning it with something like python, all of which will result in nati…

People have been making similar predictions longer than either of us has been alive. Remember Cobol? Basically that. 5th generation languages? Same thing, with a different definition of "describe". Ultimately, those all turned out to be dead ends while the "antiquated" languages kept improving and innovating, albeit usually by (re-)inventing things that already existed elsewhere.

Re: Ask HN: Why did Python win?

#19
Coming from Perl, I love Ruby (for non-Rails stuff), but end up using Python because:

- The documentation in the Python ecosystem is generally better.

- There's more Python libraries, and they're generally better maintained and better documented.

- Python has a better interface to C.

- Python is more popular and generally more supported by third parties.

- Django/Flask

- There is comparatively little Ruby activity outside of Rails and a few cybersecurity projects.

I really do not like Python. I think it's really inelegant. But it's a better tool for getting my tasks done, due to the above reasons.

Re: Ask HN: Why did Python win?

#20
It has very little to do with Python itself. Python won because GvR ran an extremely tight ship. And there were many extremely talented core developers that helped make Python a polished product. The development team made all the right decisions, except for rejecting PEP 355 which was a big mistake. The batteries included approach helped grow the ecosystem. Developers wrote third party libraries in the hopes of them eventually, someday be incorporated into Python's standard library. Python also came in an msi installer and made the Windows experience pleasant, unlike Ruby and Perl which iirc were painful to get up and running.
Post reply on HN