Live data from Hacker News

Ask HN: Why did Python win?

news.ycombinator.com

71–80 of 856 posts

Re: Ask HN: Why did Python win?

#71
The way I (somewhat hazily) remember it, Python was mainly competing with Perl as a scripting language, not Ruby as an application/web language. I started hearing about Ruby years later when Ruby on Rails drove the Web 2.0 movement, but that feels like a different era to me. Eric S. Raymond wrote an article[1] in 2000 about his experience trying Python after spending a lot of time with Perl. I'll quote some of it here:

> When you're writing working code nearly as fast as you can type and your misstep rate is near zero, it generally means you've achieved mastery of the language. But that didn't make sense, because it was still day one and I was regularly pausing to look up new language and library features!

> This was my first clue that, in Python, I was actually dealing with an exceptionally good design. Most languages have so much friction and awkwardness built into their design that you learn most of their feature set long before your misstep rate drops anywhere near zero. Python was the first general-purpose language I'd ever used that reversed this process.

[1] https://www.linuxjournal.com/article/3882

Re: Ask HN: Why did Python win?

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

Re: Ask HN: Why did Python win?

#74

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…

> Python ended up 'specializing' in data contexts, thanks to Numpy / Pandas

Yeah it was a success 20 years in the making, had a fair amount of input from science men and that being GvR’s background he responded positively e.g. the extended slices (striding) and ability to index with an unparenthesised tuple (multidimensional indexing) were very much added for the convenience of numpy’s ancestors.

I would not say it had no competition, Perl used to be quite popular in at least some sci-comp fields (I want to say bioinformatics but I’m probably wrong).

Re: Ask HN: Why did Python win?

#75

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…

Maybe it all came down to the decision to fuse python's Numeric and Numarray libraries into Numpy, providing a unified "fast" Matlab-like library, which ended up being a great fit to a lot of datascience use cases.

Re: Ask HN: Why did Python win?

#76

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…

Numpy is certainly amazing, but there are tons of competitors in the data/scientific space, which pure "A-type" data scientists tend to prefer: R, SSPS, Matlab...

The difference is that Python doesn't entirely suck as a general-purpose language. Sure, you might have better options, but it's still reasonable to write almost anything in Python.

Other scripting languages like Ruby, JS and Lua are probably a little bit better when evaluated strictly on their merits as programming languages, but they lack the ecosystem.

In other words, it might be inelegant, slow, a mess, whatever, but the concept behind it is basically correct.

Re: Ask HN: Why did Python win?

#77

Earlier quoted context omitted.

Rails is far, far more popular than Django. However, the significance of both declined with the expansion of high-tech options (Spring, Go, Scala, Node.js) and the expansion of low-tech options (Firebase). So today the popularity of the backend frameworks of each language are less important.

> Rails is far, far more popular than Django. Maybe it used to, but seems a lot more people at least searches for Django pretty much everywhere except US, Canda and Japan. https://trends.google.com/trends/explore?date=all&q=%2Fm%2F0...

For people who are wandering like me, the big jump in Django searches was the release of Django Unchained by Quentin Tarantino on Dec 25, 2012.

Re: Ask HN: Why did Python win?

#78

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…

> Python is very simple making it easy to learn.

I would argue that there's little difference between them in ease of learning. I personally found Ruby easier because everything being an object with methods and no free floating functions felt more natural and easier to look up. i.e.

string.length

over Python

len(string)

Re: Ask HN: Why did Python win?

#79
I’m sure it helps that Python is perceived as one of the easiest languages to learn (and the perceptions are largely correct), and thus found itself as the default language in thousands of Learn How To Program courses around the world. This constantly feeds new users into the ecosystem, which has grown to a critical mass.

Re: Ask HN: Why did Python win?

#80
post #66

There's a joke that is roughly "Python is not the best language for any particular task, but is nearly always the second best language for that task" - it's a jack of all trades language. Because of this, lots of people learned Python, and then applied it in many different areas, and it just became more prevalent and useful.

yeah it's a good enough especially to start poking around

many accounts of people dropping other languages with better perf or semantics to use python as a prototyping++ tool

it was a trend in many dynlangs (php and others) where you'd write the core in it and drop to C for hot loops

python is better than php, it has some metaprogramming (hello CLOS) to mold it syntactically wise, good enough stdlib, low enough semantic warts ..

than and numpy/pandas for non sweng crowds

Post reply on HN