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

As C# 7 now supports discards, the Ignore function is redundant and should be removed #59

Closed
DavidArno opened this issue Jul 12, 2018 · 1 comment

Comments

@DavidArno
Copy link
Owner

DavidArno commented Jul 12, 2018

Currently, SuccincT supplies the Ignore function for ignore the return value from an expression, eg

Ignore(someTest ? value1 : value2);

However, as of C# 7, there is now support for using discards to achieve this without the overhead of a method call:

_ = someTest ? value1 : value2;

As a result, Ignore is no longer useful or needed. Therefore it should be removed from v4.

@DavidArno
Copy link
Owner Author

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant