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
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
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.