3 ms·
Can you elaborate? Why is Python asyncio bad?
by santiagobasulto 1mo ago
Can you elaborate? Why is Python asyncio bad?
- vladms 1mo agoNot the OP but my impression with asyncio was that it's great for the uses case it was built for (hence the "no problems") but if you need to do something a bit different it can become an annoyance (hence the "unexpected bugs"). I see it for a specialized solution for a specific class of problems, which can lead to surprises if your problem evolves. There are always trade-offs to be made (performance, flexibility, hardware cost, etc.), asyncio just has different characteristics than the alternatives. Maybe since a upper bound of concurrent users it is always a great (the best?) solution, someone with more experience along all the design and requirements space could comment.
- kjs3 1mo agoI am always amused by "it's bad because it's bad at things it wasn't designed to be good at" rationalizations.
- vladms 1mo agoThere are things that are quite good for other than what they were designed for. I find it interesting when someone mentions that X is bad for something it was not designed for, as much as I am interested when someone mentions that X is good even if it was not designed for something.
- kjs3 1mo agoThere is a huge difference between "X is good/bad at something it was not designed for" and "X is bad because it's bad at something it was not designed for".
- LtWorf 1mo agoHe's probably one of the people who didn't bother to read the documentation.
- greatgib 1mo agoFirst for the syntax it is quite not good, you have to use await and async keywords plus async everything version of all that you are using. You can't mix non async code with async. And you can easily do in some way and block your application without you noticing. And in the end, async is not even really async, just cooperative execution. I'm a big fan of Python since very low version. And I don't have too much difficulty using async/asyncio now I'm used to it, but in all honesty I don't think that it is really great in the grand scheme of things.