DavidArno / SuccincT

Discriminated unions, pattern matching and partial applications for C#
MIT License
268 stars 15 forks source link

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

Closed DavidArno closed 4 years ago

DavidArno commented 6 years ago

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 commented 4 years ago

Done.