-
Notifications
You must be signed in to change notification settings - Fork 418
V2 null consistency #116
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
V2 null consistency #116
Conversation
…ne implementation.
I guess this was auto-closed because the base-branch went away. Any comments on the changes? |
That was my bad. I was too eager to close the branch |
I'm not too happy with d75ed05 and we've talked about this at some length in #114. Overloads with mere additional arguments should act as if they are optional and provide identical behaviour to those overloads where the arguments are omitted. Throwing an exception means the result cannot be computed because it would be undefined and that's not true. The goal here is not to simplify the test code. |
I can't imagine any scenario in which I would want to call Which code is more explicit/less surprising? var delimiter = ComputeDelimiter();
var x = source.ToDelimitedString(delimiter); var delimiter = ComputeDelimiter() ?? ",";
var x = source.ToDelimitedString(delimiter); As a casual reader I have no chance of knowing that delimiter will be replaced with The rest of the changes are okay? |
I'm missing a changes file where it is documented this breaking behavior change (is this done only on the nuspec file at release time?). FWIW, I agree with @yln that |
I can provide that if you guys tell me which file and format it should have. |
@yln I don't think such a file exists currently. |
Casual readers have no chance of knowing what The That all said, is On a further aside on optionality, do bear in mind that there is also the spirit & idea in LINQ (especially with standard query operators) to be able to project or translate quoted queries into foreign systems. The simpler & non-explicit overloads do help there where the exact runtime semantics are understood to be defined by the target environment. I'm certainly not suggesting that |
Okay, you convinced me. I don't have a strong opinion any more. ;) |
Remove "nullable" exceptions (other than
IEqualityComparer
andIComparer
) for consistency. Refine implementations and update docs.string.Format(format, args)
handles null just fine)