3 ms·
> The Developer UX is so much better with coroutines and just as scalable as asyncio (async/await). The sad thing is, this was all known because Twisted had be
by rdtsc 5y ago
> The Developer UX is so much better with coroutines and just as scalable as asyncio (async/await).
The sad thing is, this was all known because Twisted had been around for years before they made the decision to add async/await. Deferreds, waiting for deferreds, callbacks, deferred semaphores [1]. Not to mention the bifurcated state of libraries, a few supporting Twisted and most not supporting it. And then, when gevent/greenlet/gunicorn came around it was like a breath of fresh air. I remember the day I replaced all the Twisted stuff with a monkeypatch snippet + gevent with a good 20% of code reduction with all the boilerplate gone. And then, Python 3 rolled around and it all came back in the form of async/await.
By that point I moved on to a different ecosystem (BEAM VM Elixir/Erlang) so haven't followed much what was happening. But just point out, you're not the only one who noticed it. I remember commenting on it some years ago as well [2]
[1] https://twistedmatrix.com/documents/current/api/twisted.internet.defer.DeferredSemaphore.html https://twistedmatrix.com/documents/current/api/twisted.inte...
[2] https://news.ycombinator.com/item?id=12831271 https://news.ycombinator.com/item?id=12831271