Our code was like
Ensure.That().IsGuid();
return new Guid();
No big deal, but knowing that IsGuid already constructed the Guid and we do it again felt weird enough to bother mentioning here.
Ideating
Not actually saying "let's do this" just opening the floor for discussion on it.
Depends if it matches the style elsewhere in the library, but if it's not a crazy deviation, might consider it.
If nothing else returns the value, we should not, as it enables us to later do something like enable chaining validations, which wouldn't be possible if this returned the value
Why
Our code was like Ensure.That().IsGuid(); return new Guid();
No big deal, but knowing that IsGuid already constructed the Guid and we do it again felt weird enough to bother mentioning here.
Ideating
Not actually saying "let's do this" just opening the floor for discussion on it.
Depends if it matches the style elsewhere in the library, but if it's not a crazy deviation, might consider it.
If nothing else returns the value, we should not, as it enables us to later do something like enable chaining validations, which wouldn't be possible if this returned the value
Though, perhaps as an out parameter?