Live data from Hacker News

Ask HN: Why Did Python Win?

news.ycombinator.com

141–150 of 162 posts

Re: Ask HN: Why Did Python Win?

#141

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, f…

> None of this is the language, per se. People were not 'using Python'; they were (say) using SciPy. Sure, but the language itself has a lot to do with why library writers choose to target that language.

I fully agree. Most language users aren't library writers, they're library consumers. So it is what libraries exist that drives popularity -- with, and you are right, that language needing to be one that brings the library writers too in order for that to happen.

Multiple levels!

Re: Ask HN: Why Did Python Win?

#142
post #131

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, f…

You are missing Django/Flask which have & had very high adoption.

Good point. I never heard about them as much as the others, but that may have been my bubble / area of attention. I do know they're both very popular.

Re: Ask HN: Why Did Python Win?

#143

Earlier quoted context omitted.

English laughs at their supposed dominance.

Math peers through a microscope and smiles at all the Earth languages. So cute.

Math isn't a language, of course. What we oft refer to as "standard notation" is, but it is as earthy as all the others.

Re: Ask HN: Why Did Python Win?

#144
post #115
post #85

Earlier quoted context omitted.

I feel like if #1 was done today, there is no way on god's green earth that whitespace would be used for code blocks. It is far and away the most common footgun novices run into when I'm answering questions about why their code doesn't work.

My background is philosophy of language. I studied formal/mathematical logic in grad school. I was always embarrassed that I couldn't code, but the computer sciences classes were teaching languages that were inscrutable for someone even with my background, with syntax heavily focused on jargony math and technical concepts like object orientation (likely java at the time). Around 2010, I was talking about this with fr…

The whitespace thing is actually one of python's major flaws. That feature attaches syntactic meaning to non-printing characters. From a human standpoint, there're many examples of silence having some kind of meaning. From an engineering standpoint, that entire methodology is insane. Communication needs to be positive and deliberate.

Remember that Apple SSL bug "goto fail"? That was a whitespace bug, because even if the C feature predated python, everyone's eyes had been trained to slide right off that particularly crass shortcut as python was widespread by that point.

Re: Ask HN: Why Did Python Win?

#145
post #134

Earlier quoted context omitted.

> a famously hard to read language. That's putting it lightly. Many jokes were made at Perl's expense on that topic, but $\=$/;for(@ARGV){open F,$_;while( ){print if/$_/}} is a valid Perl program to grep for lines that are the file's name. One of the jokes was that it was a write only language and it was only half way a joke. Coming back to a pile of magic variables months later with no comments, omfg. Meanwhile, Pyt…

Every programmer worth their salt must learn to use power tools, and also train to work beyond the beginner-intermediate levels, that has now become the permanent situation in our line of work. Nobody should be spending a day writing Python to do work that can be done using a vim macro in like 5 mins. Or spend a year doing in Python what can be done in a week in Perl. >> $\=$/;for(@ARGV){open F,$_;while( ){print if/$…

This might be the stupidest comment I've ever read on HN. There's not a single case where using Perl is the right call. As others have joked it's a "write only"language. The garbage you write in Perl is illegible to everyone else and will be illegible to yourself once you move on to the next project and have to come back and debug your old Perl in 18months+. You think you're being clever with your Perl one liners and mini scripts but you're actually sabotaging your team. My honest opinion is that anyone who knows this and still writes Perl needs to be fired because they're actively undermining the team and the organization with code that is essentially legacy technical debt the minute it's committed to the organization repos.

You use a real language for these projects because it allows someone besides yourself to collaborate and maintain the project

Re: Ask HN: Why Did Python Win?

#146
Python succeeded because in the ages before LLM you had to be able to learn a language in order to use it and Python was easy to learn and use for beginners and for experienced devs who were too tired to use a more complex language

Re: Ask HN: Why Did Python Win?

#147
post #134

Earlier quoted context omitted.

> a famously hard to read language. That's putting it lightly. Many jokes were made at Perl's expense on that topic, but $\=$/;for(@ARGV){open F,$_;while( ){print if/$_/}} is a valid Perl program to grep for lines that are the file's name. One of the jokes was that it was a write only language and it was only half way a joke. Coming back to a pile of magic variables months later with no comments, omfg. Meanwhile, Pyt…

Every programmer worth their salt must learn to use power tools, and also train to work beyond the beginner-intermediate levels, that has now become the permanent situation in our line of work. Nobody should be spending a day writing Python to do work that can be done using a vim macro in like 5 mins. Or spend a year doing in Python what can be done in a week in Perl. >> $\=$/;for(@ARGV){open F,$_;while( ){print if/$…

There is nothing to feel great about wasting effort and more importantly time.

Which is why the tasks you're talking about are being delegated to LLMs that don't GAF what the target language is.

Re: Ask HN: Why Did Python Win?

#148

Earlier quoted context omitted.

Math peers through a microscope and smiles at all the Earth languages. So cute.

Math isn't a language, of course. What we oft refer to as "standard notation" is, but it is as earthy as all the others.

> of course

It's reasonable to disagree, but let's not pretend that some alternative is the obvious choice.

The laws of physics as a program and math as its language is just as good as any other framing. And its a short logical hop to expect that more than one civilization would discover that language.

Re: Ask HN: Why Did Python Win?

#149
post #115

Earlier quoted context omitted.

My background is philosophy of language. I studied formal/mathematical logic in grad school. I was always embarrassed that I couldn't code, but the computer sciences classes were teaching languages that were inscrutable for someone even with my background, with syntax heavily focused on jargony math and technical concepts like object orientation (likely java at the time). Around 2010, I was talking about this with fr…

The whitespace thing is actually one of python's major flaws. That feature attaches syntactic meaning to non-printing characters. From a human standpoint, there're many examples of silence having some kind of meaning. From an engineering standpoint, that entire methodology is insane. Communication needs to be positive and deliberate. Remember that Apple SSL bug "goto fail"? That was a whitespace bug, because even if…

I don't think it has anything to do with Python. I had plenty of 'if' errors in C++ caused by indenting the second line and not putting braces around it prior to Python. They were always painful to debug. I finally just _always_ put a brace around an 'if' block, regardless of whether it is one line or many, and I've never had that problem again. I think the problem is that C lets you omit the brace for one line; it should always require a brace.

Python executes like it reads, which seems like a positive feature to me. Makes errors like C's two-line if block impossible.

Re: Ask HN: Why Did Python Win?

#150

Earlier quoted context omitted.

I forgot two, er, three: 9. Python got lucky that its inevitable screwups (Python3) didn’t quite kill it. 10. Swift and Kotlin both define programming as serving the compiler (specifically LLVM) rather than serving the coder’s problem . (I haven’t discussed Rust so far since it isn’t attempting to compete with 98% of Python use cases, but if you squint you can see it as going one step further than Swift and Kotlin an…

I can't stop thinking about this. WRT Perl specifically, it’s fascinating how the two competitors adopted Unix shell patterns. Python is handicapped to this day by not automagically snarfing up environment variables, etc. But Perl leaned hard into TECO-style gibberish and the meta-syntax that is regular expressions, confronting beginners with arbitrary complexity. It feels like Wall embraced the system administrator…

Guido van Rossum was not an accomplished mathematician. He has a master's Degree in Mathematics and Computer Science, and got a bronze medal in the International Mathematical Olympiad, but the former is because that's where CS was taught, and the latter because he was a smart high school student.

As he described it:

"But after that first year [of college], it turned out that the real math I wasn’t particularly good at. And I think there were some great teachers at that university and some super cool topics being taught. And I couldn’t keep up. I remember something about a particular form of group theory. And I knew—and a few other students who were like, “Oh, you’ve got to go do graph theory, or group theory.” And I was like—it went way too fast. And I suddenly realized I didn’t have the skills to keep up with those topics. But in the meantime, starting almost from my first month I entered the math department, I had been learning to program because they had I think one of the first-year undergraduate courses was programming in Pascal."

Quoting from 'Oral History of Guido van Rossum', https://www.computerhistory.org/collections/catalog/10273871...

Post reply on HN