Skip to content

await dot syntax #1752

@AlexeyBukin

Description

@AlexeyBukin

Some asynchronous code looks bad when you use a lot of objects and properties.

var v = (await future1((await future2).property2)).property1;

I would like to see (await someFuture()).property as someFuture().awaited.property then code above could be rewritten as

var v = future1(future2.awaited.property2).awaited.property1;

We could use await Instead of awaited to highlight it more for readability.
What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureProposed language feature that solves one or more problemsstate-duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions