Live data from Hacker News

Why Python keeps growing, explained

github.blog

181–190 of 459 posts

Re: Why Python keeps growing, explained

#181
post #142

I wish I could wave a magic wand and replace all the Python in the world with JavaScript. The languages are practically equal in terms of features. They're both typeless with layered-on crutches available to make the runaway dynamism less painful. They both have weird footguns and ugly syntax and annoying design flaws, but these are different for each. So if you're forced to use both languages, it's an endless pain i…

Here's how out-of-the-loop I am: I'd don't know the command line method for invoking the JS runtime on my computer! What it is? I regularly image my laptop, so I'd like to know what the system JS command line is. (I use Linux & macOS.)

Not really safe to assume there's a decent one. Better to install directly from https://nodejs.org/

Re: Why Python keeps growing, explained

#182

Earlier quoted context omitted.

Well at least 10x, sometimes more. Not really surprising when you think about that it's a VM reading and parsing your code as a string at runtime.

> it's a VM reading and parsing your code as a string at runtime. Commonly it creates the .pyc files, so it doesn't really re-parse your code as a string every time. But it does check the file's dates to make sure that the .pyc file is up to date. On debian (and I guess most distributions) the .pyc files get created when you install the package, because generally they go in /usr and that's only writeable by root. It…

> re-parse your code as a string every time

That doesn’t really take any significant time though on modern processors.

Re: Why Python keeps growing, explained

#183

Earlier quoted context omitted.

>It's got the talking point about Python that we were hearing about 10 years ago - "tired of those pesky curly brackets in Java, try this new language you might not have heard of: Python!" That was a talking point closer to 20 years ago, at this point.

You're right, I think I was caught out by the unending march of time :)

There's a joke I saw that goes like:

   1980-2000 = "30 years ago"
   2000-2010 = "10 years ago"
   2010-2023 = "Recently

Re: Why Python keeps growing, explained

#184

Earlier quoted context omitted.

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…

Using Python vs Rust is in no way in the same league as not having tests.

Totally agree. That's why I clarified:

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

Unless you're working on a fire-and-forget project with a tiny time horizon get shit done arguments are blatantly short-termist.

Re: Why Python keeps growing, explained

#185
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…

[deleted]

Re: Why Python keeps growing, explained

#186

Earlier quoted context omitted.

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.

The entire point of doing things the right way is that you end up delivering more value in the long term, and "long term" can be as soon as weeks or even days in some cases. Business owners definitely prefer less bugs, less customer complaints, less support burden, less outages, less headaches. Corner cutting doesn't make economic sense for most businesses and good engineering leadership doesn't have much trouble com…

Try the travel/event booking business (where I'm in) - and no, people don't dump their mistakes on the next guy here - to the contrary, the "hacky" Python solutions are supported for years and teams stay for decades (allthough a decade ago we had not discovered how great Python was)

What business owners actually don't like at all is how long is takes traditional software development to actually solve problems - which then don't really fit the business after wasting a few years of ressources... and the dumping and running away is worse in Java and other compiled software. With Python you can at least read the source in production if the team ran away...

Re: Why Python keeps growing, explained

#187
post #142

I wish I could wave a magic wand and replace all the Python in the world with JavaScript. The languages are practically equal in terms of features. They're both typeless with layered-on crutches available to make the runaway dynamism less painful. They both have weird footguns and ugly syntax and annoying design flaws, but these are different for each. So if you're forced to use both languages, it's an endless pain i…

Somewhat agree. In fact for a recent project I began writing in JS for this reason but quickly ran into opinions from team mates with no JS exposure asking "Why wouldn't you use Python?", so I did. But, I think JS as a Python replacement is problematic because:

1. Some probably usable version of Python is already on your computer. Not true for JS.

2. Forced use of async in JS library code, even though Node.js doesn't require it.

Re: Why Python keeps growing, explained

#188
post #75
post #65

Earlier quoted context omitted.

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

If the 1 second is spent waiting for IO, it will take 1 second in whatever language. But yes python is slow. However I've seen good python code be faster than bad C code.

Of course algorithmic complexity will trump anything else at big enough n values.

Re: Why Python keeps growing, explained

#189

This was already posted at https://news.ycombinator.com/item?id=35000415 , I don't know why it didn't detect the duplicate. I'll repost my comment from there: This is a strange article. It's got the talking point about Python that we were hearing about 10 years ago - "tired of those pesky curly brackets in Java, try this new language you might not have heard of: Python!". Who reading the GitHub blog has not heard of…

It's doubly weird, since the antigravity module doesn't have a fly attribute, and it "does its thing" on import.

https://github.com/python/cpython/blob/main/Lib/antigravity....

Re: Why Python keeps growing, explained

#190

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…

> This week our Director ordered a total rewrite of two years of work in Python WTF? Unless your system is originally written in a proprietary language that literally no one outside your company knows, I'll say it's a good sign that you need to change team (or change job). Don't work under a director like that.

Agreed. Coincidentally, I resigned the day before this was announced.
Post reply on HN