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)…
Ask HN: Why did Python win?
581–590 of 856 posts
Re: Ask HN: Why did Python win?
#582Re: Ask HN: Why did Python win?
#583Earlier quoted context omitted.
Python has a default None return, Ruby returns the value of the last expression. Neither (except maybe the None case in Python) is really implicit, Ruby is just an expression oriented language while Python is statement-oriented. OTOH, in Ruby the keyword “return” is superfluous except for altering control flow for an early return, while in Python it is the mechanism for supplying a return value.
> Python has a default None return, Ruby returns the value of the last expression. I would really hate this feature in a language without strong static typing.
I don’t mean using testing as a poor man’s type system, I mean even the tests you would write in a statically typed language will quickly uncover any mistakes you could possibly make there.
Re: Ask HN: Why did Python win?
#584Earlier 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…
yep the Perl community kind of had issues around the turn of the millennium and the perl6 debacle did a lot to convince people that Perl was kind of a dead end. I don't think there was any toxicity in the Ruby community but it was made up of working programmers where as the big leading voices in the python community was teaching assistants and students so it might have been more tailored to newbies. I don't recall th…
Yeah that's my recollection too. About 2011ish there weren't a lot of jobs in python yet. Perhaps in SV, but not out in the real world. Several startups were doing it, including Youtube and google at the time.
But in the F500 world, python wasn't used at all. I started using it in 2008/9-ish.
Re: Ask HN: Why did Python win?
#585Re: Ask HN: Why did Python win?
#586Python 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…
Re: Ask HN: Why did Python win?
#587The way I (somewhat hazily) remember it, Python was mainly competing with Perl as a scripting language, not Ruby as an application/web language. I started hearing about Ruby years later when Ruby on Rails drove the Web 2.0 movement, but that feels like a different era to me. Eric S. Raymond wrote an article[1] in 2000 about his experience trying Python after spending a lot of time with Perl. I'll quote some of it her…
Re: Ask HN: Why did Python win?
#588Earlier quoted context omitted.
The amount of complexity that Rust adds is not worth in most scenarios in my opinion. I can think of Rust as something for OS with critical safety or so. Besides that, in real life you end up having C in most of your software, so I am not sure how Rust behaves compared to well-written C++ with all warnings and linters on and using smart pointers. But my hypothesis is that they do not stay very far apart in safety. Th…
All this may be true (I'm not the strongest C++ developer in the world, relatively limited exposure), however the Rust memory management via the type system feels natural once you wrap your head around it. That idea is really good. I always hated dealing with `delete`, `free` and `malloc`. Being able to offload all that busy work to the type system is just nice. There are definitely ergonomic improvements that could…
Re: Ask HN: Why did Python win?
#589Earlier quoted context omitted.
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.
The JavaScript ecosystem is objectively smaller. JavaScript doesn’t have a foothold in data science and ETL, nor deep learning, nor DevOps. There are no decent ORMs in JS, and Python has several. JS is poor for numerical and scientific programming.
Re: Ask HN: Why did Python win?
#590Earlier quoted context omitted.
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 That sucks. I've been doing Ruby full-time since 2014 at 4 companies and I've never seen that sentiment, even from people who really love it. My experiences have been really positive.
I was arguing for the F500 company I was working on to explore using Jython to write unit tests for Java code.
Why not have a scripting language to write unit tests for Java code?
I see this with Rust trying to extend python in interesting ways. I don't see this with Java trying to extend C/C++ or Python.