Live data from Hacker News

Ask HN: Why did Python win?

news.ycombinator.com

761–770 of 856 posts

Re: Ask HN: Why did Python win?

#761
post #697

Earlier quoted context omitted.

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

Isn't Python's tooling usually considered some of the worst?

By what standard? Yours? Java developers? Rust developers? The fact that Python has typing now, tools to check those, and has plenty of tooling around “make it faster”, I think your world view might be stuck in 2010. Python has gone from a slow obscure scripting language to a powerhouse. Conda, NumPy, Scikit, PyTorch, GPU programming, Games, Analytics, web apps, API’s, I think it’s safe to say this ain’t your grandpa’s Python anymore.

Re: Ask HN: Why did Python win?

#762
post #568

Earlier quoted context omitted.

C++ and Python are not competitors. Sure both are Turing complete so you can implement anything in either. However if you should is a different question. Python is very difficult to maintain when you program goes over 100k lines of code, while the static type system of c++ is good for millions. C++ compiles to fast binary code, while Python is typically 60x slower for logic (though often Python calls a fast algorithm…

As painful as the Python package system is, C/C++ is so much worse. I remember trying to compile GTK+ on a solaris system a decade ago, and remembering how terrible it was to even to get it to compile. You're really deluding yourself if spending your time in compiler dependency hell is so much better than python.

The new CMake package manager may make things easier.

Re: Ask HN: Why did Python win?

#763

Earlier quoted context omitted.

I'll bite on "just a fad in webdev circles", in case you are serious and not trolling. Railsworld is celebrating the 20th anniversary of Rails this year. As I'm sure you know, Rails is built on Ruby. 20 years does not fit my definition of fad.

Just because there are people who still use it, doesn't make the statement that RoR was a fad less true. RoR was "the thing that everyone was using" at one point. It was that for several years. Anyone who's anyone was building stuff with Rails. Now it's probably the third option, when building websites... and a fourth option, when building APIs.

>RoR was "the thing that everyone was using" at one point. It was that for several years. Anyone who's anyone was building stuff with Rails.

I extremely doubt that. Maybe in your geographical area with small stage startups.

At any given time Spring has probably seen 10x usage of RoR.

Re: Ask HN: Why did Python win?

#764
post #73

Earlier quoted context omitted.

I've heard so many people say that Ruby is really easy to pick up and work with and for some reason I've had the exact opposite experience. I have tried to learn Ruby at least three or four times and I bounce off it every time. There are a bunch of other languages that I've learned and worked with effectively, but for some reason my brain just refuses to grok Ruby.

That's word for word my experience with Go. I wonder if people are different enough that programming languages cannot be one sized fits all?

That's funny, I tried Go for Advent of Code last year and got through the first 10 days or so without any real difficulty, having never written a line of it before.

Just as there are different spoken/written languages and people find different ones easier or harder to learn based on a huge number of variables, I believe the same is true of programming languages. Sometimes it's the syntax that makes a language difficult, sometimes it's a different paradigm, sometimes it's an unfamiliar memory model or type system -- there are lots of things that can make your brain throw up a block when trying to dive into a new language.

Re: Ask HN: Why did Python win?

#765

Earlier quoted context omitted.

> 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.

Doesn’t seem like that big of a deal. You’re going to have a really hard time getting your first test to pass if you make a mistake. 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.

In statically typed systems, this wouldn't even compile.

I'm pretty sure I'd see multiple cases where the function would return different types depending on a code path.

Re: Ask HN: Why did Python win?

#766
post #697

Earlier quoted context omitted.

Isn't Python's tooling usually considered some of the worst?

By what standard? Yours? Java developers? Rust developers? The fact that Python has typing now, tools to check those, and has plenty of tooling around “make it faster”, I think your world view might be stuck in 2010. Python has gone from a slow obscure scripting language to a powerhouse. Conda, NumPy, Scikit, PyTorch, GPU programming, Games, Analytics, web apps, API’s, I think it’s safe to say this ain’t your grandpa…

I have seen Python in action since 2010 plenty of times, including the present. It's been a mess every time. My worldview is driven by F# and Elixir, namely the `dotnet` and `mix` tooling, respectively. So no, Python's tooling does not impress me in the slightest. The first thing you need to do is get agreement on all the different checkers, linters, formatters. For Elixir, there's one tool for each task. My worldview feels quite current.

Those other things you mentioned aren't relevant to tooling. They're distributions, libraries, and applications. But note that Conda's existence was basically due to the fact of Python's tooling being poor.

Re: Ask HN: Why did Python win?

#767

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…

That's a fascinating wrong way to look at history. Python has no specializing. It always played strong on many popular fields.

From the early days, it had a strong leaning to science, after all that's where it came from. But at the same time it also had a strong stance in unix-areas and established itself as a good tool for sysadmins, competing with perl and bash. And at the same time it also had strong bindings with other languages, gave it early on the fame of a glue-language. It also dabbled early in Web-Stack and networks and had to many web-stack-option to gain that "one framework"-fame, like ruby on rails.

Python just was the language which allowed you to play on on all the important fields, with simplicity, even with some level of speed. This was something other languages lacked. They either were complicated, or slow, or lacking support for specific areas. Python just somehow acquired them all, and had a big impact on a broad area, which made it so popular, because for the majority of usecases it was a natural option.

Re: Ask HN: Why did Python win?

#768
post #66

There's a joke that is roughly "Python is not the best language for any particular task, but is nearly always the second best language for that task" - it's a jack of all trades language. Because of this, lots of people learned Python, and then applied it in many different areas, and it just became more prevalent and useful.

I have always thought it was a good prototyping language. You can get something working fast then rewrite it in a better language later.

Re: Ask HN: Why did Python win?

#770
post #292

Earlier quoted context omitted.

I loved Perl. I _loved_ it. It was so much fun. It felt like vim in how you could guess weird corners of the language. But every reason that made it fun is also an actual reason why it's a nightmare unless you are very strict in how its used. Strict on things like whitespace.

Whitespace strictness is the biggest downside of python.

In my experience, Python has way bigger warts than something that's just automatically handled by my IDE.
Post reply on HN