The author gets close to what I think the root problem is, but doesn't call it out. The truth is that in python, async was too little, too late. By the time it was introduced, most people who actually needed to do lots of io concurrently had their own workarounds (forking, etc) and people who didn't actually need it had found out how to get by without it (multiprocessing etc). Meanwhile, go showed us what good green…
Python has had async for 10 years – why isn't it more popular?
171–180 of 305 posts
Re: Python has had async for 10 years – why isn't it more popular?
#172Re: Python has had async for 10 years – why isn't it more popular?
#173- Async is a legitimately hard to get if you are just starting to learn it, which is probably why its isn't more popular in the python community.
- If you need async, that implies you need hi I/O performance. At that point, you probably should have picked a more performant language + runtime (Java, Node), bc use case should dictate tooling.
- It's not enough to make a language + web framework to be async -- the DB drivers need to be async too (author mentions sqlalechemy got async support in 2023 and django orm is a WIP).
I like python, but not bc its async or multi-threaded. I like it bc when I use it, I know I do not have to worry about those things and the new set of problems I have to handle when I do.
For the i/o and multi-threaded perf, give me java and node (maybe erlang/elixir if I am feeling extra spicy). For the fast and easy scripting, with massive community of open source of talent and high quality libraries (including the vast majority of web app slop), give me python.
Re: Python has had async for 10 years – why isn't it more popular?
#174Earlier quoted context omitted.
Having to put "await" everywhere is very explicit. I'd even say it's equally explicit to a bunch of awkward closures. Why do you say it's less?
Because it hides away the underlying machinery. Everything is in a run loop that does not exist in my codebase. The context switching points are obvious but the execution environment is opaque. At least that's how it looks to me.
Green threads are better (IMHO), because they actually do hide all the machinery. As a developer in a language with mature green threads (Erlang), I don't have to know about the machinery[1], I just write code that blocks from my perspective and BEAM makes magic happen. As I understand it, that's the model for Java's Project Loom aka Java Green Threads 2: 2 Green 2 Threads. The first release had some issues with the machinery, but I think I read the second release was much better, and I haven't seen much since... I'm not a Cafe Babe, so I don't follow Java that closely.
[1] It's always nice to know about the machinery, but I don't have to know about it, and I was able to get started pretty quick and figure out the machinery later.
Re: Python has had async for 10 years – why isn't it more popular?
#175The author gets close to what I think the root problem is, but doesn't call it out. The truth is that in python, async was too little, too late. By the time it was introduced, most people who actually needed to do lots of io concurrently had their own workarounds (forking, etc) and people who didn't actually need it had found out how to get by without it (multiprocessing etc). Meanwhile, go showed us what good green…
Re: Python has had async for 10 years – why isn't it more popular?
#176I will take a couple stabs: - Async is a legitimately hard to get if you are just starting to learn it, which is probably why its isn't more popular in the python community. - If you need async, that implies you need hi I/O performance. At that point, you probably should have picked a more performant language + runtime (Java, Node), bc use case should dictate tooling. - It's not enough to make a language + web framew…
Its either because its the only language they know or they just don't really care about performance and want to finish the project fast.
Re: Python has had async for 10 years – why isn't it more popular?
#177The author gets close to what I think the root problem is, but doesn't call it out. The truth is that in python, async was too little, too late. By the time it was introduced, most people who actually needed to do lots of io concurrently had their own workarounds (forking, etc) and people who didn't actually need it had found out how to get by without it (multiprocessing etc). Meanwhile, go showed us what good green…
Re: Python has had async for 10 years – why isn't it more popular?
#178The author gets close to what I think the root problem is, but doesn't call it out. The truth is that in python, async was too little, too late. By the time it was introduced, most people who actually needed to do lots of io concurrently had their own workarounds (forking, etc) and people who didn't actually need it had found out how to get by without it (multiprocessing etc). Meanwhile, go showed us what good green…
forking and async are totally different things.
Re: Python has had async for 10 years – why isn't it more popular?
#179I will take a couple stabs: - Async is a legitimately hard to get if you are just starting to learn it, which is probably why its isn't more popular in the python community. - If you need async, that implies you need hi I/O performance. At that point, you probably should have picked a more performant language + runtime (Java, Node), bc use case should dictate tooling. - It's not enough to make a language + web framew…
To be frank someone who picks python is not doing it because they want the best performance. Its either because its the only language they know or they just don't really care about performance and want to finish the project fast.
And there is nothing wrong with that. In fact, this should be the norm.
Re: Python has had async for 10 years – why isn't it more popular?
#180I haven't read the article yet, but I do have something to contribute: several years ago I was ay PyCon and saw a talk in which someone mentioned async. I was interested and wanted to learn to use it. But I found there was no documentation at all! The syntax was briefly described, but not the semantics. I realized, years later, that the (non-)documentation was directed at people who were already familiar with the fea…
FWIW Python got async/await before JavaScript did. I believe at the time the main inspiration was C#.