You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which obviously has "Against" in it twice and comes across as a double negative. It's also not clear (to me at least without reading the docs/ viewing the source) whether the expression should describe the "happy path" or the "invalid path". It would be more clear if I knew I was guarding against something I did not want, and then the expression would describe the INVALID state.
How to Implement:
Mark AgainstExpression as obsolete.
Create Expression or name similar if we can't use that name and have it do the same thing.
Consider using CallerArgumentExpression in the parameter list if that makes sense.
Make sure it's super clear that the expression should be the negative, invalid case. When it's true, that means the input is BAD, and an exception will be thrown.
After we publish the two side-by-side I will remove the obsolete one in a future version.
The text was updated successfully, but these errors were encountered:
Currently when using the expression guard you have to write code like this:
which obviously has "Against" in it twice and comes across as a double negative. It's also not clear (to me at least without reading the docs/ viewing the source) whether the expression should describe the "happy path" or the "invalid path". It would be more clear if I knew I was guarding against something I did not want, and then the expression would describe the INVALID state.
How to Implement:
AgainstExpression
as obsolete.Expression
or name similar if we can't use that name and have it do the same thing.After we publish the two side-by-side I will remove the obsolete one in a future version.
The text was updated successfully, but these errors were encountered: