logoalt Hacker News

ffsm8today at 7:03 AM1 replyview on HN

That's a great point I didn't think about. From that perspective, it does make sense.

Maybe my feeling is just rooted in the fact I've never used a language which allowed ?. on assignment


Replies

moomintoday at 7:27 AM

My take is that it’s pretty minor. Modern C# has across the board null checking and for the most part you’re not designing things where this even comes up. You are, however, correct, in that I have 100% seen the ?SetName thing used by devs who just wanted to make the null checker go away and didn’t actually think about what the correct behaviour was.