Live data from Hacker News

Ask HN: Why did Python win?

news.ycombinator.com

651–660 of 856 posts

Re: Ask HN: Why did Python win?

#651
I started using Python because of Google Wave. Initially stayed with it because of Google App Engine. Before that I was only using C++ for over a decade. When I stopped using GAE I stayed with Python because I noticed that it is such a good tool to easily solve problems, be it managing the OS, building servers and clients, collecting and analyzing data.

I've always used Javascript and have been using a bit of Rust lately.

But I guess what made it "win" lately is IPython/Jupyter and Conda, which enables non-programmers to use Python as a language to express and solve their problems, like Mathematica or MATLAB did for mathematicians and engineers.

So I guess that Google added a bit to its popularity.

Re: Ask HN: Why did Python win?

#652
The first time when I heard about it (in 2009), the talk was that Google was using it internally. And it was the first language to be supported in their AppEngine platform. And Django was solid. These were the things that helped Python, in my point of view.

Re: Ask HN: Why did Python win?

#654
> My impression is that in the ‘00s, Python and Ruby were both relatively new

Contrary to popular belief, Python is older than Java.

> math libraries, numpy and pandas make it appealing to academics

The most important factor: these libraries are free.

Re: Ask HN: Why did Python win?

#656

Earlier quoted context omitted.

> There should be one-- and preferably only one --obvious way to do it. There’s not even one obvious flavour of Python to use.

It's hard for me to name a problem domain that doesn't have 3 different python packages doing the same thing three different ways, each more clever and less understandable than the last.

for real

If it's not on the stdlib, I'd go with the most popular one, or just DIY

No, it is not "best practice" to use a barely tested module with half the bugs affecting its main functionality just because someone thinks it is

Unfortunately package abandonment is a thing and they don't even bother fixing needed bugs (which, coupled with 'the urge to deprecate' makes things annoying)

Re: Ask HN: Why did Python win?

#657
post #517

Earlier quoted context omitted.

Python was already the #2 scripting language (after perl; not counting Visual Basic) back in ~1994 when I learned it. Tcl was already dying out by then and Ruby hadn't been released. So you basically had Perl or Python. You're right that it was a "first mover" advantage but I don't think data science had a lot to do with it. Perl didn't evolve gracefully over the 1995-2005 period but Python did. I think it is probabl…

Was python really ahead of shell for scripting in 1994?

No :-)

Re: Ask HN: Why did Python win?

#658

Ruby was never similar in popularity to Python. It was just a fad in webdev circles. I've rarely seen ruby before RoR and I've seen python all over. Python was popular as a teaching language, how it gained a foothold in academia. I remember 20 years ago when I was starting out it was popular for game scripting (Lua was more embeddable but python was also used). plenty of first class interfacing methods to native code…

I'll bite on "just a fad in webdev circles", in case you are serious and not trolling. Railsworld is celebrating the 20th anniversary of Rails this year. As I'm sure you know, Rails is built on Ruby. 20 years does not fit my definition of fad.

[deleted]

Re: Ask HN: Why did Python win?

#659
post #505

Earlier quoted context omitted.

That was my experience. I like Perl. I'm comfortable with Perl. And after about a day of Python, I never wrote another line of new Perl code. There were so many "it can't possibly be that easy, but it is!" moments. Let's write a function to add five to a number: def add_five(num): return num + 5 OK. So, can I pass that function as an argument to another function? def call(func, value): return func(value) call(add_fiv…

Python didn't corner the market there: (define (add-five num) (+ num 5)) (define (call func value) (func value)) (call add-five 10) Admittedly, this was one-of-many examples. I do wonder how much would be different today if not for the Monty Python gags in the documents.

It did corner the market for "no extra brackets needed just in case people want to treat code as data which most people don't want to".

Re: Ask HN: Why did Python win?

#660

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

This sounds like an idea without any real data. For people to prefer one they had to try both and I guess especially data science people just took the most common language in their field.

People seem to forget or miss that it took many, many years for Python to become popular outside data science. If it had just been clearly better or easier that transition should have gone much faster.

As someone else mentioned, at one point universities started using Python as an introduction language. I am still sad that they did not choose Ruby or js but here we are.

Post reply on HN