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

chore: mark async, await, and concurrently as soft reserved #3

Merged
merged 1 commit into from
Dec 31, 2022

Conversation

azjezz
Copy link
Member

@azjezz azjezz commented Dec 31, 2022

This would allow using these keywords as function and class names.

This would allow using these keywords as function and class names.

Signed-off-by: azjezz <azjezz@protonmail.com>
Comment on lines +25 to +30
$a = async(bar());
$b = await($a);
($c, $d) = concurrently(
await(baz()),
await(qux()),
);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this means using parenthesized expressions with await and async is now impossible.

since we can't tell if await ( $foo ) is a function call, or await operation on ( $foo ), going with a function call is a safe bet, we can add a rule in the linter to check for call to undefined function named async or await, which will explain this.

@azjezz azjezz merged commit b36cd5a into main Dec 31, 2022
@azjezz azjezz deleted the chore/async-soft-reserved branch December 31, 2022 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant