Live data from Hacker News

Why Python keeps growing, explained

github.blog

131–140 of 459 posts

Re: Why Python keeps growing, explained

#131

I think one reason for Python growing popularity is because it's become the default tool in some domains whether it is the best tool or not. This week our Director ordered a total rewrite of two years of work in Python. His rationale: it's what everyone else uses in this space. No reason specific to our use case, just simply to follow the herd. I realise that a large community translates into easy hiring and rich eco…

... and Python _became_ the default tool because the de facto developer consensus (after years of competing languages) is that an interpreted language should = be usable, and = provide a set of data structures that an educated programmer *expects to find when scripting*. Python literally sucked less than the alternatives.

[deleted]

Re: Why Python keeps growing, explained

#132
post #66

Earlier quoted context omitted.

There are also programmers who are tired of chasing pointers and simply want to get stuff done. E.g. people who once wrote "robust" code in Rust but were "outcompeted" left and right by coworkers who churn out shiny new things at 10x the speed.

At some point, every engineer has heard this same argument but in favor of all kinds of dubious things such as emailing zip files of source code, not having tests, not having a build system, not doing IaC, not using the type system, etc. I'm sure Rust was the wrong tool for the job in your case but I find this type of get shit done argument unpersuasive in general. It overestimates the value of short-term delivery an…

The business owner (whoever writes the checks) prefers get shit done over "the right way". Time to completion is a key factor of the payoff function of the devs work.

Re: Why Python keeps growing, explained

#133

Earlier quoted context omitted.

Luck of libraries and initial userbase are certainly involved in success, but not all scripting languages are equal. I mean we could add bash to that list then. In fact I'd argue that python enjoying the success it has, despite probably the worst handling of a version bump in any language (2->3), is a testament to its popularity.

The worst version bump ever seen was Perl 6 which literally became another language (Raku).

[deleted]

Re: Why Python keeps growing, explained

#134
post #7

Eh, they're just a lot of ways to say "path dependence". Scripting languages are basically the same exact technology with respect to each other. In the alternate universe where numpy and scipy are, let's say, numruby and sciruby, wouldn't we be here asking why Ruby keeps growing? That's not a sales pitch for python, it's a sales pitch for the concept of a scripting language; it's like saying "you should really buy a…

Why did Rails get outcompeted by newer (and also some older) alternatives in the long run, when numpy and scipy did not?

Ruby would have a much bigger market share these days if library path dependence was that powerful.

Re: Why Python keeps growing, explained

#135
post #11

Python keeps growing in number of users because it’s easy to get started, has libraries to load basically any data, and to perform any task. It’s frequently the second best language but it’s the second best language for anything. By the time a python programmer has «graduated» to learning a second language, exponential growth has created a bunch of new python programmers, most of which don’t consider themselves progr…

> It’s frequently the second best language but it’s the second best language for anything. This myth wasn't even true many years ago, it certainly isn't true today. You can build a mobile app, game, distributed systems, OS, GUI, Web frontend, "realtime" systems, etc in Python, but it is a weak choice for most of those things (and many others) let alone the second best option.

When I switched from PHP to Python years ago I had the same feeling as the OP, then it became the third best, then the fourth, then situational when object-orientation makes sense, then for just scripting, and now... unsure beyond a personal developer comfort/productivity preference. TUIs and GUIs built on Python on my machine seem to be the first things to have issues during system upgrades because of the package management situation.

Re: Why Python keeps growing, explained

#136

Comparing Python to Java 8 and saying it’s more readable isn’t showing much. And it’s not very portable the second dependencies with native code (which is common since pure Python is too inefficient for many tasks) are used. I think Python is popular for two reasons: - it’s believed to be beginner friendly compared to other languages. I’m not really sure why - maybe the whitespace? - it has an enormous set of librari…

Python's biggest advantages are in my experience: 1. Near zero boilerplate. Python's boilerplate is usually no more than setting up a class and then calling a method. Often you can skip the class and just call it directly. This is probably the biggest strength; to give you an example, my standard test for a languages approachability is "how much work do I need to put in to get a very simple JSON file from a web URL"…

>"how much work do I need to put in to get a very simple JSON file from a web URL" (nothing fancy like POST, just an HTTP GET). With python, a call to urllib.request.urlretrieve and then a call json.loads are all you need.

In C# you just have to do this: var things = await httpClient.GetFromJsonAsync>("url");

Re: Why Python keeps growing, explained

#138

I remember when Twitter rewrote the code in Java because Ruby wasn't suited for the task. Probably this will happen to many large Python code bases in the future.

Every codebase will eventually be rewritten in Rust sometime before the heat death of the universe.

As a divine punishment?

Re: Why Python keeps growing, explained

#139
post #11

Python keeps growing in number of users because it’s easy to get started, has libraries to load basically any data, and to perform any task. It’s frequently the second best language but it’s the second best language for anything. By the time a python programmer has «graduated» to learning a second language, exponential growth has created a bunch of new python programmers, most of which don’t consider themselves progr…

I completely agree - but you say that like it's a bad thing. I work as a developer alongside data scientists, who might have strong knowledge of statistics or machine learning frameworks rather than traditional programming chops. For the most part they don't need to know about concurrency, memory efficiency etc, because they're using a library where those issues have been abstracted away. I think that's what makes py…

Most programmers don't actually need to know about that stuff, either. And most programmers who do need to know about that stuff, don't know about it.

Re: Why Python keeps growing, explained

#140
post #65
post #35

Earlier quoted context omitted.

There's also the argument that at a certain scale the time of a developer is simply more expensive than time on a server. If I write something in C++ that does a task in 1 second and it takes me 2 days to write, and I write the same thing in Python that takes 2 seconds but I can write it in 1 day, the 1 day of extra dev time might just pay for throwing a more high performance server against it and calling it a day. A…

Realistically something that takes 1 second in C++ will take 10 seconds (if you write efficient python and lean heavily on fast libraries) to 10 minutes in python. But the rest of your point stands

Not for everything. There are plenty of Python operations that are not 10x slower than c.
Post reply on HN