Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

await dot syntax #1752

Closed
AlexeyBukin opened this issue Jul 22, 2021 · 2 comments
Closed

await dot syntax #1752

AlexeyBukin opened this issue Jul 22, 2021 · 2 comments
Labels
feature Proposed language feature that solves one or more problems state-duplicate This issue or pull request already exists

Comments

@AlexeyBukin
Copy link

AlexeyBukin commented Jul 22, 2021

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?

@AlexeyBukin AlexeyBukin added the feature Proposed language feature that solves one or more problems label Jul 22, 2021
@lrhn
Copy link
Member

lrhn commented Jul 22, 2021

See also #25.

@lrhn lrhn added the state-duplicate This issue or pull request already exists label Jul 22, 2021
@AlexeyBukin
Copy link
Author

@lrhn thanks, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Proposed language feature that solves one or more problems state-duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants