|
|
|
|
|
by SideburnsOfDoom
276 days ago
|
|
> his actually _reduces_ the "mental size" of C# IDK, if you read Settings?.RetryPolicy = new ExponentialBackoffRetryPolicy();
as "there is a now a ExponentialBackoffRetryPolicy" then you could be caught out when there isn't. That one ? char can be ignored .. unless it can't. It's another case where "just because it compiles and runs doesn't mean that it does the thing".This to me is another thing to keep track of. i.e. an increase in the size of the mental map needed to understand the code. |
|
As I wrote in another comment, ignored side effects are perhaps the one questionable aspect of it. I usually assume RHS is evaluated first, regardless of what happens on the left - but I'm not sure that mental model was actually correct. But keeping that would mean having to simply do explicit if _when_ there are side effects. So
But for non-side effects It's obviously hard to know when there are side effects, but that problem already existed. You could trip this up before too e.g. Would have tripped you up. But at least it's obvious WHY it would. Something I have long sought in C# is a good way of tracking what is pure and what isn't.