Live data from Hacker News

Ask HN: Why did Python win?

news.ycombinator.com

291–300 of 856 posts

Re: Ask HN: Why did Python win?

#291

Earlier quoted context omitted.

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

>I think Python was popular as a general-purpose language first. What were their choices though, Perl? It's easy to see why Perl lost out. Other than PHP, I don't really know of any other JIT scripting languages they could have chosen.

Icon? Smalltalk? Dylan? Scheme? Common Lisp?

Re: Ask HN: Why did Python win?

#292
post #68

Earlier quoted context omitted.

> 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

I loved Perl. I _loved_ it. It was so much fun. It felt like vim in how you could guess weird corners of the language. But every reason that made it fun is also an actual reason why it's a nightmare unless you are very strict in how its used. Strict on things like whitespace.

Whitespace strictness is the biggest downside of python.

Re: Ask HN: Why did Python win?

#293
I come from an analytic philosophy background. I studied mathematical logic and set theory in grad school as part of my logic requirements. I never learned to program for a long time, and it was always a source of embarrassment. A friend finally suggested that I learn Python because it was "English-like" as you say, so I bought Learn Python the Hard Way.

When I opened the book, unlike java or js, I could just read the code. Like... I could just read it and already understood what was happening. I already knew way, way more logic than would ever need. I think it took me about a day to figure out object-orientation, but it was trivial. I went from not knowing how to program, to being able to run fizz buzz in like a day, and do it with objects in like three. Other languages are so caught up in so much bullshit technical stuff I still can't stand them.

Python is intuitive. It's approachable. I focuses on getting you from zero-to-code over a bunch of much more technical applications. Python is the party that welcomes you in, instead of checking your ticket at the door.

As a non-CS person who has fallen in love with programming, I honestly never want to learn another language if I don't have to.

Re: Ask HN: Why did Python win?

#294
post #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 b…

Anyone who used Matlab to process text before 2015 wouldn’t consider it anywhere closer as a competitor to Python

Same goes for R/SASS

Python has no competitor in terms of the whole package, it is a full featured language while being particularly good at data

Re: Ask HN: Why did Python win?

#295
Many comments have commented on the ecosystem, but I've thought a big reason behind python's success is that it's also a well designed language in terms of readability and lack of surprise. My background was in perl and shell scripting before finding python and the absolute beautiful form of the language (that whitespace is significant in more ways than one!) and its utter insistence that There's One And Only One Obvious Way To Do It (more or less) made programming much more ergonomic compared to the other similar scripting languages at the time.

Re: Ask HN: Why did Python win?

#296

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…

Can you explain more about how (you feel) Python is a step backwards? I'm curious if the "steps backward" are syntax level?

I feel the Ruby community is very syntax oriented. As evidence of this:

I see Ruby developers interested in Elixir and Crystal, languages that are syntactically similar, but technically very different.

I do not see Ruby developers interested in Python, even though, if we ignore syntax, Python and Ruby mine as well be the same language. Technically speaking, and in the grand scope of all languages, Ruby and Python are very very similar.

Re: Ask HN: Why did Python win?

#297

Earlier quoted context omitted.

Python may be JIT now (is it?), but it certainly wasn’t back then.

JIT may not be the correct thing to call it. At least in my head, any script that doesn't need to be compiled by the dev or the user before running is JIT. It's the scripting vs building difference to me. If that's not correct, then I'd love to be corrected. Here's my reference: https://en.wikipedia.org/wiki/Just-in-time_compilation

Interpreter vs. Compiler might be closer to the distinction you are looking for:

https://en.wikipedia.org/wiki/Interpreter_(computing)

Re: Ask HN: Why did Python win?

#298
post #239

Earlier quoted context omitted.

As evidenced by the unified Python library / dependency management system.

I use pip 100% of the time

>> I use pip 100% of the time

What about pipenv, poetry, conda, setuptools, hatch, micropipenv, PDM, pip-tools, ActiveState platform, homebrew, or your Linux / BSD distro's package manager?

Re: Ask HN: Why did Python win?

#299
I was there.

I learned Python first. I saw Ruby as a "similar language, faster, more syntax-heavy, popular in Japan".

Python "won" because of Guido's focus on ease of use by non-programmers. A bunch of scientists used it to steer long-running computations in C, by binding the fast C math libraries with a Python frontend. Python was so easy to use that new scientists and interns could get started easily.

I don't know why Ruby has stalled out. Its "test first" culture and of course Ruby on Rails, and Chef, are all excellent.

Re: Ask HN: Why did Python win?

#300

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

> I think Python was popular as a general-purpose language first.

That matches my memory as well. I can't find any references, but I seem to remember a quote going around way back circa 2008 that goes something like "Ruby is popular because it's the language used to write Rails; Django is popular because it's written in Python."

Post reply on HN