Skip to content
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
@alexeyraspopov

Description

@alexeyraspopov

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions