3 ms·
Nice! I was also hoping for some sort of guaranteed not-nullable type and immutable classes. Maybe in C# 8.
by iliketrains 10y ago
Nice! I was also hoping for some sort of guaranteed not-nullable type and immutable classes. Maybe in C# 8.
- daxfohl 10y agoF# has guaranteed not-nullables, except when you do default<NotNullableThing> it returns null. That said, it generally works well in well-defined situations but any time there's deserialization it's often a bigger mess than just never assuming not-null. I think it's a problem that needs to be solved in the CLR, not C#, and my guess is it probably never will be.