Live data from Hacker News

Ask HN: Why did Python win?

news.ycombinator.com

91–100 of 856 posts

Re: Ask HN: Why did Python win?

#91

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.

In many cases, Ruby has almost the opposite philosophy. There's nothing wrong with that - but I think a lot of people prefer Python's choices.

Re: Ask HN: Why did Python win?

#92
post #68

When I first encountered Python, it was as an alternative to Perl. Given the choice between Perl and Python, I think it's clear why the latter won out.

> When I first encountered Python, it was as an alternative to Perl. Me too I am amazed that Python won out against Perl Perl is much easier to use. Does not have the incredibly irritating treatment of whitespace Perl was a disrupter, whereas Python was "computer sciencey". A false dichotomy but it really mattered to people

Perl being easier to use is a joke... Ruby suffers the same issue as Perl does - you can do the same thing a million different ways, that's too many.

Re: Ask HN: Why did Python win?

#93
post #60

Earlier quoted context omitted.

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

If there's a winner, it's still named "Java".

Based on what?

https://madnight.github.io/githut/#/pull_requests/2023/2

https://insights.stackoverflow.com/trends?tags=python%2Cjava

Re: Ask HN: Why did Python win?

#94
post #9

> My impression is that in the ‘00s, Python and Ruby were both relatively new They were, but Python is close to 5 years older than Ruby (February 1991 vs December 1995), so in the ‘00s, Python was significantly older than Ruby. Ruby also was more or less a Japanese-only thing until around 2000. https://en.wikipedia.org/wiki/Ruby_(programming_language)#Ea... : “In 1999, the first English language mailing list ruby-tal…

Early on, at least English speaking ruby had an extremely poor culture around documentation. Code was barely commented and "the ruby way" was to use single character variable names

And the culture of metaprogramming and monkey patching didn’t help.

If the documentation is bad you can read the source, but if you need to grok 3 layers of metaprogramming living in unpredictable locations before you can do that there’s no way to advance (practically).

Re: Ask HN: Why did Python win?

#95
post #31

I first encountered Python around 2000. At the time Perl was more popular in the circles I frequented, and TCL probably about as popular as Python (eggdrop[1] notwitstanding), but Python was growing steadily. I encountered Ruby in the late '00s (as others have noted it made its english-language debut almost a decade after Python started) and Lua was another contender during this time. My memory is that, at least outs…

I think it upset the Perl hegemony in part because of the enterprise infatuation with object orientation. Perl got a lot of flak from the Java/XML crowd (“Perl’s not a real language—it’s not object oriented!”). You could kind of write Java in Python, and thus a certain kind of enterprise techie couldn’t dismiss Python as “just” a scripting language.

The word "enterprise" kind of reminded me of one possible significant reason for python's huge adoption rate after the second part of the 2000s. Google started using it for a lot of things at some point and was advertising a ton of python jobs. That was both a shining endorsement and a possible way into the company.

Re: Ask HN: Why did Python win?

#96

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 relied only on web development Chef, Puppet, Vagrant, Logstash, etc are not web development. Ruby dominated (dominates?) DevOps tooling.

I think their comment still holds. Those are all tools that you use, and mostly don't care what language they're written in. When you've got to write Ruby, it was predominantly in the context of RoR.

I think also that dominance has mostly faded. When I think of languages that dominate devops now, I think of Go, and I say that as someone that dislikes Go.

Re: Ask HN: Why did Python win?

#97
post #73

I have never encountered a language as easy to pick up and do cool stuff with as Ruby is. Even after years of working with it I still find Python to be a bit of a mess. I think there was an article years ago about how some people liking a product means it is going to die? I'm pretty sure that is me for technology.

I've heard so many people say that Ruby is really easy to pick up and work with and for some reason I've had the exact opposite experience. I have tried to learn Ruby at least three or four times and I bounce off it every time. There are a bunch of other languages that I've learned and worked with effectively, but for some reason my brain just refuses to grok Ruby.

That's word for word my experience with Go. I wonder if people are different enough that programming languages cannot be one sized fits all?

Re: Ask HN: Why did Python win?

#98

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.

Not exactly the same thing but flutter and dart have a similarly weird relationship too.

Re: Ask HN: Why did Python win?

#99

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 relied only on web development Chef, Puppet, Vagrant, Logstash, etc are not web development. Ruby dominated (dominates?) DevOps tooling.

I'm sorry, but for me it seems that Go has is taking the lead in adoption rates for devops tooling.

Ruby isn't the go-to language there anymore... probably because GoLang compiles statically.

Re: Ask HN: Why did Python win?

#100
Rails was really good at building a very specific type of website and that kept Ruby popular for a while, but SPAs resulted in back end web apps that mostly just shuffled json around, something you don't need Rails for (though rails does a fine job of it) with it's page-oriented world; that responsibility got delegated to React.

Meanwhile, python ended up being the default programming language taught to domain experts in a ton of different domains. Having your engineers write the same programming language as your domain experts turns out to be really useful for business. Using NodeJS as your backend if you consider web your domain is also an excellent choice and also eats into Rails' market share.

I have seen some shops with modern rails deployments do truly awesome stuff, but it's hard to beat being able to take a script an analyst has written, hit it with a linter, and throw it into your production application.

Also, for what it's worth, the python 2/3 debacle was a much bigger deal back in the height of Rails' popularity. I was genuinely worried that the schism would continue to haunt the community; that someone would fork 2.x and we'd have two competing pythons. That didn't happen thankfully.

Post reply on HN