Live data from Hacker News

Ask HN: Why did Python win?

news.ycombinator.com

511–520 of 856 posts

Re: Ask HN: Why did Python win?

#511

Earlier quoted context omitted.

Back when I decided it was time to add a scripting language, Perl and Python seemed like the obvious choices, and in my mind were equally good options. I asked my best friend which I should choose, and he more or less said, "You can't go wrong with either one, but when you ask for help Perl people are assholes and Python people are nice." I can't confirm his thoughts on Perl and I haven't interacted much with Ruby, b…

The only ruby person i've met was insistent that ruby was the one true way and he trued to force it into everything. That attitude turned me off. Of course I already knew Python, and so did the rest of my team so we had been doing tools in Python (the guy wasn't on my team), but until he pushed ruby into places where python would have been better (import a Python library rather than shell to out to a program) I was w…

> The only ruby person I've met was insistent that ruby was the one true way and he trued to force it into everything. That attitude turned me off.

I mean, if you read almost any Elixir article that has hit the front page of HN, there are always comments from Pythonistas saying, "Why bother when there's Python?" Similar attitude. Obviously it's not everyone, but it's not everyone in the Ruby community either.

Re: Ask HN: Why did Python win?

#512
Very little to learn in terms of key syntax + a lot of Real Words allows it to be an approachable scripting language for non-computer-specialists. The library ecosystem allows it to be used broadly, but it's not unique in this regard. It just happens to correspond with a huge boom in accessible computing resources & a desire to use them in a variety of fields.

Re: Ask HN: Why did Python win?

#513
post #428

Earlier quoted context omitted.

Back when I decided it was time to add a scripting language, Perl and Python seemed like the obvious choices, and in my mind were equally good options. I asked my best friend which I should choose, and he more or less said, "You can't go wrong with either one, but when you ask for help Perl people are assholes and Python people are nice." I can't confirm his thoughts on Perl and I haven't interacted much with Ruby, b…

I can't imagine Python's welcoming community has anything to do with it. If anything it was Ruby that had a reputation for being the most welcoming community with its MINASWAN (cringe) philosophy.

Maz (ruby author) is nice and so we are nice, isn’t so bad. It’s twee sounding but saying you are going to follow the example set by the founder is absolutely fine. Is it any worse than the Python ‘benevolent dictator for life’ example?

Re: Ask HN: Why did Python win?

#514
post #9

> My impression is that in the ‘00s, Python and Ruby were both relatively new They were, but Python is close to 5 years older than Ruby (February 1991 vs December 1995), so in the ‘00s, Python was significantly older than Ruby. Ruby also was more or less a Japanese-only thing until around 2000. https://en.wikipedia.org/wiki/Ruby_(programming_language)#Ea... : “In 1999, the first English language mailing list ruby-tal…

Original asker here, thank you for this comment. Lots of people are arguing about the pure merits of the languages, but the gap in usage IMO is way too big to be explained by “Python has only one way of doing something” or “Python is multi-paradigm.”

Understanding that Python was established years before Ruby was being discussed answers the question of why Python is preferred for many use cases.

Re: Ask HN: Why did Python win?

#515

Earlier quoted context omitted.

People have been making similar predictions longer than either of us has been alive. Remember Cobol? Basically that. 5th generation languages? Same thing, with a different definition of "describe". Ultimately, those all turned out to be dead ends while the "antiquated" languages kept improving and innovating, albeit usually by (re-)inventing things that already existed elsewhere.

You are mistaking syntax for features. C++ got popular because it managed data structures under the hood automatically. I.e, you didn't have to keep track of memory offsets or function pointers. Java got popular because it did that and also managed memory allocation under the hood automatically. Python (and Javascript) got popular because it did all of that and also managed types under the hood automatically. The fut…

Javascript got popular because it was the only option to program for the web. That's it.

Python and other dynamic languages don't "automatically manage types", they just let you not write the types down in the code. The types still exist and need to be managed by the programmer. There's zero cognitive load improvement there.

As for the AI stuff, lol. I see no point discussing concepts so far out of reach they're in the realm of sci-fi. What you're describing is just magic compared to what we can do in 2023.

We already have languages that automatically pick the best algorithms by the way, in the form of declarative languages like SQL. They don't seem to work very well outside of the realm of fetching data from databases.

Re: Ask HN: Why did Python win?

#516
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

Some people (me included) LOVED the whitespace-as-a-feature. I had swam through too many scripts where everything (regardless of nesting level) was all on the first character of a line or otherwise spaced randomly where my first step was to properly indent just to understand what it was doing. A language that enforced that was a Godsend.

Goes to show there is no pleasing everybody

Re: Ask HN: Why did Python win?

#517

Earlier quoted context omitted.

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…

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?

Re: Ask HN: Why did Python win?

#518
post #414

Earlier quoted context omitted.

+1 for mentioning that python's original competitor was Perl. This point is forgotten some 20-30 years latter

Not just perl, but C/C++/Java as well. Ruby was a competitor to Java JSP development back in the day. And I remember when a lot of Java people jumped ship to Ruby. I moved from C++ to python over a decade ago and never looked back. Back then, the python jobs were scarce -- but based upon how I picked up the language, many of the typical C++ issues just disappeared -- and I knew it was going to become popular. One com…

> the best college level introductory course probably should not have been SICP based but Python

i saw this linked on here recently: https://wizardforcel.gitbooks.io/sicp-in-python/content/

Re: Ask HN: Why did Python win?

#519
post #277

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…

It is sad to me that you hate Ruby. It is a better language than Python for my taste in all dimensions except number of libraries available. To begin with I could never understand why there need to be those global functions in Python to do meaningful things with lists. In Ruby the "everything is an object" really works down to every nut and bolt and is clean and very conceptually pleasing. Whether you call a package…

Was simply for readability, as in similar to English prose. What if the length of my list is greater than 10?

  if len(mylist) > 10:
      pass
Only general things dealing with common needs are global, list-centric methods are on the list where they belong. I learned Java before Python and don't really miss value.toString() or value.length() much.

Re: Ask HN: Why did Python win?

#520
Beginners and non-coders find it really easy to start with, because so much code reads and writes like psuedo-code.

The middle-ground coders - i.e. those that mainly use programming as a tool to solve some specific problems - but rarely delve into full-blown software engineering projects / complex programs / systems programming / etc. found Python to be really easy due to all the provided libraries, and lack of boilerplate code.

The "true" programmers use Python for smaller projects, like proof-of-concept / prototype work, and then continue in a language that's easier to work with as the codebase grows.

Of course, there are many more beginners / novices that will only briefly touch Python, than seasoned pros, hence the rise in popularity. Python is no longer scaring away people from coding.

Post reply on HN