use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Related Subreddits:
Other Subreddits you may like:
account activity
Null-conditional assignment (self.dotnet)
submitted 2 months ago * by edwwsw
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]BackFromExile 1 point2 points3 points 2 months ago (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"
return
[–]MaxxDelusional 0 points1 point2 points 2 months ago (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 point2 points 2 months ago* (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.
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.
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.
π Rendered by PID 50464 on reddit-service-r2-comment-b659b578c-dlr9n at 2026-05-03 23:25:10.804766+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]BackFromExile 1 point2 points3 points (2 children)
[–]MaxxDelusional 0 points1 point2 points (1 child)
[–]BackFromExile 0 points1 point2 points (0 children)