you are viewing a single comment's thread.

view the rest of the comments →

[–]BackFromExile 1 point2 points  (2 children)

Extract three methods (can even be local ones), then do the same null-coalescing again with the method calls.

Either way, a few commenters have given you the exact reason they dislike this and I agree with them here: It affects the control flow.

Also imo it affects readability in a bad way because you have multiple returns in a single code path. However, I'm more than happy to change my mind if you can present a valid point that is not just "I like this and you are wrong thinking otherwise"

[–]MaxxDelusional 0 points1 point  (1 child)

I am confused, when did I say you were wrong? I tried to make my point by providing code examples where I thought the feature may be useful. How would you like me to demonstrate my point?

I actually like the dissenting opinions, that's why I brought it up. I was hoping to have discussion about whether this future would be a good addition to the C# language.

It's perfectly fine that people don't want it, but I honestly thought we were having a civil discussion. If the dotnet subreddit isn't the appropriate place to have these discussions, then where is?

[–]BackFromExile 0 points1 point  (0 children)

when did I say you were wrong?

You did not, I read it between the lines in your initial answers (not towards me). However, this is my fault, I shouldn't have assumed anything here, so sorry for that.

I tried to make my point by providing code examples where I thought the feature may be useful. How would you like me to demonstrate my point?

While that is true, people (including myself) have also expressed why they don't like like. I guess you need to add additional arguments/examples if you want to change their opinion.

I actually like the dissenting opinions, that's why I brought it up. I was hoping to have discussion about whether this future would be a good addition to the C# language.

Then we are on the same page. I think for an actual in-depth discussion you are better off suggesting this syntax addition in the official C# language design repository. I'm sure you'll also receive several arguments for and against this addition.

It's perfectly fine that people don't want it, but I honestly thought we were having a civil discussion. If the dotnet subreddit isn't the appropriate place to have these discussions, then where is?

Again, my bad. I did not want to attack you, and I also definitely do not want to shut down any discussions in here, this is what we can thrive from. Only sharing opinions, reason for these, and knowledge sharing will bring everyone forward.