This repository was archived by the owner on Jan 26, 2022. It is now read-only.
This repository was archived by the owner on Jan 26, 2022. It is now read-only.
Use async for
instead of for await
#24
Closed
Description
Python's PEP-0492 (Coroutines with async and await syntax) has good explanation of why it should be
async for (let item of items) {
// ...
}
instead of
for await (let item of items) {
// ...
}
await
means "wait next expression to be resolved" that conflicts with meaning of cycles. async
means "next block has asynchronous computations that should be awaitable".
It also will be consistent with async function
and will request the same approach for making blocks async: simply by adding word async at the start.
Metadata
Metadata
Assignees
Labels
No labels