3 ms·
What's the alternative with Gevent? Passing callbacks everywhere? Is that somehow better than async/await syntax? Libraries will still have to be re-written an
by lopatin 5y ago
What's the alternative with Gevent? Passing callbacks everywhere? Is that somehow better than async/await syntax?
Libraries will still have to be re-written and public interfaces will change. Might as well do it right, and not abandon the concept of functions having meaningful return values.
- sonthonax 5y ago> What's the alternative with Gevent? Passing callbacks everywhere? You build on callbacks to create futures and queues. That’s how you do async programming in any framework. AsyncIO works on top of this and so does Gevent. The only real difference between the two is that asyncio explicitly types functions that do IO. The fundamental advantage is little more than a typing decorator. The reason that JavaScript was such a crapshoot of callbacks was because the majority of JavaScript developers had no idea what a future/promise was.