Live data from Hacker News

Ask HN: Why Did Python Win?

news.ycombinator.com

31–40 of 162 posts

Re: Ask HN: Why Did Python Win?

#32
I have recently gone all in on Python. Before I decided this, I was using Python for projects where I needed Pandas or numpy. I used React/TypeScript/Node for web applications. But, I moved to Django/HTMX.

The main reason is to avoid npm, but also, I wanted something with more built-in defaults (my web apps have simple needs). It has nothing to do with the language -- it's more the ecosystem for me.

I considered Ruby/Rails, but it didn't seem enough better than Python and can't replace the Pandas work I need to do.

Re: Ask HN: Why Did Python Win?

#33
It's hardly "inexplicable"... particularly if you're comparing it to Perl, a famously hard to read language.

* Python has clean and readable syntax that a complete beginner can understand -- it's really close to the pseudocode you might use for teaching.

* Python has a good standard library, so you can do a lot before you need to work out how to install more (and, reproducibility concerns aside, `pip install` is really simple once you get there)

* Because it was easy to pick up and easy to use for teaching, it took over some niches like stats in academia / data-analysis, where the people doing the work aren't professional programmers but just need something they can hack together. Once NumPy existed, people had minimal incentive to move away.

(Insert Marge Simpson "I just think it's neat" gif here.)

Re: Ask HN: Why Did Python Win?

#34
post #17
post #6

I think the reason python won was that it was easy to learn and read and was batteries included. vs perl: People need to solve their problems, not fight with syntax Theres a lot of network effects as well. The more people were using it, the more people will use it.

I don't believe the "syntax win" scenario. Python is also ugly, due to the required indentation, like yaml. I believe more in the ecosystem, specifically how the computer vision and machine learning movements have adopted python extensively as frontend language (the heavy weightlifting is still doing in C++). The exploit of numpy has brought many many use cases into the language as well.

It's not about being beautiful or ugly, it's about being simple.

Python is simple to read / write and easier to reason about, especially for people that need a programming language to solve a problem but are not software engineers.

The reason it won, especially in data analysis, is because most data analyst are/were not software engineer and Python feels more natural to people.

The indentation is not a big problem when a decent text editor is used

Re: Ask HN: Why Did Python Win?

#35
post #17
post #6

I think the reason python won was that it was easy to learn and read and was batteries included. vs perl: People need to solve their problems, not fight with syntax Theres a lot of network effects as well. The more people were using it, the more people will use it.

I don't believe the "syntax win" scenario. Python is also ugly, due to the required indentation, like yaml. I believe more in the ecosystem, specifically how the computer vision and machine learning movements have adopted python extensively as frontend language (the heavy weightlifting is still doing in C++). The exploit of numpy has brought many many use cases into the language as well.

That 'ugly' required indentation and whitespace also made Python easier to read, especially for newbies and casual coders. A standard visual structure and a syntax that is pretty close to executable pseudo-code lowered the barrier to entry for a lot of people and made Python feel 'approachable'. This perception that it was easy to use helped increase the network effects other have noted.

Re: Ask HN: Why Did Python Win?

#36
Ex-product manager of an IDE and language here. Languages, like just about anything, win because of what you can do with them: ie, value. Consider Ruby on Rails: it drove Ruby; the achievement was easily creating fullstack web apps, at just the right time. Consider VB: you could build UI apps. No languages win based on the language itself but what it lets you achieve. Usually, this is in the form of libraries:* ie, functionality that using the language lets you achieve. It's not the language, but where using the language lets you get to.

Python is a nice language, but so are others. I know of three main libraries -- three main "I can get stuff done" -- eras with Python, and I think these drove Python.

1. Beautiful Soup. Early/mid 2000s, web scraping and website / XML / HTML data manipulation were a thing; this library came along and made it easy. I'd heard of Python before on places like Slashdot; it was cool but Perl was more spoken of. Then, in my anecdotal experience, what I suddenly read about was not Perl or Python, but Beautiful Soup.

2. NumPy / SciPy. Python was apparently written with numerical computing in mind, and NumPy in its current form arrived a bit after BS. Early 2000s: stats and data vis folk were using R. By the 2010s, I was hearing about all these people that were not using R, but were using NumPy and SciPy.

3. AI. Until a few years ago, it was all SciPy, then with the current era, everyone is using Python -- for AI.

None of this is the language, per se. People were not 'using Python'; they were (say) using SciPy.

I think Python benefited hugely from having not a single "I can achieve stuff" value proposition, like VB did; it had three consecutively in a row.

These all had roots well before they became well-known. Enthusiasts, initial design, years of work and usage, and 'suddenly' out of nowhere everyone is using it. The common factor there is likely Python's design and community; there would be lower level reasons for Python's success than the things it let users achieve, and those would be, what incentivised or led to Python being used for those libraries (value enablers) in the first place. I can't speak to that; I wasn't there in the Python community in the 90s or 2000s.

[*] Not always: Rust's value is in its memory system and safety. That is not a library but inbuilt, yet that still is something you can do, a goal, value, something you achieve using the language and thus you turn to the language in order to achieve. Rust minus that would need some other reason to be used.

Re: Ask HN: Why Did Python Win?

#37
post #17
post #6

I think the reason python won was that it was easy to learn and read and was batteries included. vs perl: People need to solve their problems, not fight with syntax Theres a lot of network effects as well. The more people were using it, the more people will use it.

I don't believe the "syntax win" scenario. Python is also ugly, due to the required indentation, like yaml. I believe more in the ecosystem, specifically how the computer vision and machine learning movements have adopted python extensively as frontend language (the heavy weightlifting is still doing in C++). The exploit of numpy has brought many many use cases into the language as well.

> don't believe the "syntax win" scenario. Python is also ugly, due to the required indentation, like yaml.

That's like, your opinion. Python was explicitly designed being easy to learn, borrowing heavily from ABC, which actually experimented with different syntaxes to see what works and what doesn't. The indentations apparently helps a lot with this, along with ':' before the introduction of indented blocks.

Re: Ask HN: Why Did Python Win?

#38
Because not many people prioritize syntax design like GvR. Even now if someone releases a new programming language most people will ask what features it has, how fast it is, how fast is the package manager etc. Because these questions are simple yes and no ones. Unlike syntax design choices.

Even if they ask about the syntax design people just dismiss their question with saying "syntax is not important". Python did the opposite, it focused on syntax over everything else. That caught on with beginners and now here we are.

Of course with AI Python got even more popular, but even before ChatGPT was released it was already dominant.

Re: Ask HN: Why Did Python Win?

#39
post #17
post #6

I think the reason python won was that it was easy to learn and read and was batteries included. vs perl: People need to solve their problems, not fight with syntax Theres a lot of network effects as well. The more people were using it, the more people will use it.

I don't believe the "syntax win" scenario. Python is also ugly, due to the required indentation, like yaml. I believe more in the ecosystem, specifically how the computer vision and machine learning movements have adopted python extensively as frontend language (the heavy weightlifting is still doing in C++). The exploit of numpy has brought many many use cases into the language as well.

Indentation is there regardless, and is increasingly enforced by format-checking tooling which is more commonly an out-of-the-box offering for many ecosystems (gofmt).

So why not make it have syntactical meaning since it’s already there in 99% of cases?

It does feel weird at first but honestly it’s not something you’ll think about much after a while.

Re: Ask HN: Why Did Python Win?

#40
Nothing against Python but I still use Perl 5 because it works for what I need to do.

The Perl 6 redesign was announced in 2000 and it has been going on for 2 decades? Python is clearly a good programming language but the Perl 6 redesign took so long that many people gave up. Then it was renamed Raku in 2019 I think.

Post reply on HN