Skip to content

Discard script submission result (intentionally) #545

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

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

atifaziz
Copy link
Contributor

@atifaziz atifaziz commented Jun 4, 2020

A non-game-changing PR to use native syntax for discarding the submission result, which makes it more obvious that it was intended.

@seesharper seesharper requested review from seesharper and filipw June 4, 2020 19:42
try
{
returnValue = await resultTask;
_ = await resultTask;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can't we just do await resultTask here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but a discard captures the intention to deliberately ignore the return value at the call site. Just awaiting doesn't tell you if the ignorance was an omission or an intention.

Copy link
Member

@filipw filipw left a comment

Choose a reason for hiding this comment

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

thanks

@filipw filipw merged commit a2f1013 into dotnet-script:master Jun 5, 2020
@atifaziz atifaziz deleted the discard branch June 5, 2020 07:09
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.

3 participants