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 #60

Closed DavidArno closed 6 years ago

DavidArno commented 6 years ago

Currently, SuccincT supplis 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. It should therefore be removed from v4.

DavidArno commented 6 years ago

Duplicate issue.