3 ms·
> Python is my favorite language, and I can live with the explicit loop, but explicit scheduling is ridiculous. Just run the damn coroutine You can't "just run
by masklinn 5y ago
> Python is my favorite language, and I can live with the explicit loop, but explicit scheduling is ridiculous. Just run the damn coroutine
You can't "just run the damn coroutine", that's not what coroutines are.
But that does point to the mistake of Python, at least from a UX perspective: coroutines are more efficient but they're also a lot more prone to use errors, especially in dynamically typed languages. Async functions should probably just have been tasks, which is what they are in JS.
- BiteCode_dev 5y agoI know, but we could make coroutine creates with async have a special marker that is different to yield and auto schedule.
- masklinn 5y agoThat’s what a task is.