Live data from Hacker News

Ask HN: Why did Python win?

news.ycombinator.com

351–360 of 856 posts

Re: Ask HN: Why did Python win?

#351

I've been writing code since the mid-90's, probably in a dozen languages or so over that timespan. In my experience, Python is "easy" -- as in, you can quickly achieve what you want. It doesn't get in your way with opinions about types or data structures. You can rapidly create horrific kludges that produce the results you want. Not sure I'd say it's a programmer's language. It's like javascript that way, but without…

I believe what you describe is basically a preference for a language you already know.

I'm quite proficient in JavaScript and could repeat everything you say about ... JavaScript. OTOH I had to do things in Python a bunch of times, and it was always very frustrating.

Re: Ask HN: Why did Python win?

#352

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…

Today I learnt I'm fucking old. My first web programming exposure was Perl CGI scripts

#metoo, 1993.

Re: Ask HN: Why did Python win?

#353
One issue that sticks out to me is that 20 years ago it was hard to get Ruby and Rails installed on a Windows XP System.

While the friction of installation isn't the sole reason why Ruby isn't as popular as Python, it did leave a bad impression on many devs as they shifted their projects to PHP.

Re: Ask HN: Why did Python win?

#354
I started programming around 2007. I actually wanted to get into Common Lisp, because I was heavily influenced by Paul Graham, HN and early Reddit. I did try a couple of web frameworks with Common Lisp, but didn't get very far.

Ruby on Rails was very big at the time, but I ended up choosing Python for a couple reasons. Python was a bit older, it already had a reputation as a scripting language for system administration. It had more libraries like Numpy and seemed like you could do more things with Python. You could script, write desktop apps, use it for data science, while Ruby was pretty much just for web dev.

Even back then there was a huge ecosystem of Python package and it seemed like anything you wanted to do with Python, there was already a decent library available for it. So it seemed like you had more options learning Python. Django was also just coming out at the time, so you could do web dev with Python too. Then Reddit rewrote their site and switched from Common Lisp to Python, so that seemed like a good endorsement too.

Python became as big as it has because Machine Learning / AI exploded and Python was there to benefit from that. Numpy / Pandas / Jupyter Notebooks etc. gave everyone who wanted to learn ML/AI FREE tools that were as good or better than Matlab / Mathematica / SPSS or other software that cost thousands of dollars. Grad students are poor. Maybe their school has a Matlab license they can use, but they probably can't install it on their personal laptop, so they used Python instead, wrote all of the influential papers about ML using Python, then anyone else who wanted to learn from that installed Python and so it goes.

Re: Ask HN: Why did Python win?

#355
You started using Javascript after they fixed it with ES6. When I started working with Python, I had just left a NodeJS project in ES5 callback + prototype hell and didn't want to get anywhere near Javascript until they added proper scoping rules and classes.

Re: Ask HN: Why did Python win?

#356

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…

Bingo! Then you have 2-3 year experience junior devs join your company because they know react and are completely blank stare faced when you ask them how they are serving their data.

Re: Ask HN: Why did Python win?

#357
Python and Ruby both have an optparse library in their standard library. Compare the documentation for yourself:

https://docs.python.org/3/library/optparse.html

https://ruby-doc.org/stdlib-2.7.1/libdoc/optparse/rdoc/index...

I learned Python 2.3 almost 20 year ago, and the standard library documentation in Python has always been just as good. As a beginner I found Python's documentation very helpful, I could read the documentation like a tutorial, like a book, a good teacher. To this day I still look at the Python regular expression documentation whenever I'm using a regular expression in any language. I learned regular expressions from the Python documentation, there was literally no blog or tutorial I found more approachable than the Python documentation when I was very first learning regular expressions.

Ruby had, and still has, a list of methods for documentation.

Re: Ask HN: Why did Python win?

#358

One reason: Perl community spent most/all of its capital on the Perl6 debacle. People waited for years (decades?) for Perl6 to come out. Most moved on (to Python). Perl6 turned out to be a totally different language when it did come out. Mind you, I love Raku and use it daily but its development did cost Perl mindshare and marketshare.

Raku is great but needs that killer use case. Raku is the best language for processing / parsing / generating text.

I'm surprised nobody took it and created the best in class LLM toolchain with it.... langchain but better. Any projects out there trying with raku?

Re: Ask HN: Why did Python win?

#359
> Now Ruby is still very much alive; there are plenty of Rails jobs available and exciting things happening with Ruby itself. But Python has become a titan in the last ten years. It has continued to grow exponentially and Ruby has not.

Ruby (outside of Japan, where I understand this has not always been the case) has its popularity almost entirely tied to Rails, Python was much broader, and its resurgence with AI/ML is largely because of its excellent scientific stack which has been around for a long time but people outside of that space often ignored, but which makes it an unequaled high-level glue language in that space.

Re: Ask HN: Why did Python win?

#360

Earlier quoted context omitted.

So I imagine you have that perspective because you started less than 20 years ago. In some ways the idea of the Pythonic Way to do things evolved in opposition to Perl's vigorous advocacy of More Than One Way. Python has been really winning for some time, so it's natural that its ideological discipline has grown ragged. The crop of kids who value options above consistency don't have the scars of the Perl age to infor…

> But Python is -dramatically- better focused, as a community, on finding a Pythonic way to proceed, and then advocating it, than previous cultures. I would revise that to be that the pythonic culture of one acceptable way to to is better matched with a lot of good development practices. Perl was also very good at finding a Perl way to proceed. It's just that with Perl that often mean a lot of implicitness and "do wh…

Not just practices, tooling. The whole typing system. Linting to check for mistakes. For the love of black.
Post reply on HN