It's horrible.
For example, it treats Linq's .First() as nullable. (.First() throws an exception, .FirstOrDefault() returns null.)
Type.Name is also treated as nullable.
I didn't encounter any issues like that when I tried Swift and Rust.
For example, it treats Linq's .First() as nullable. (.First() throws an exception, .FirstOrDefault() returns null.)
Type.Name is also treated as nullable.
I didn't encounter any issues like that when I tried Swift and Rust.
LINQ's First() correctly returns a non-nullable type: https://source.dot.net/#System.Linq/System/Linq/First.cs,11
FirstOrDefault() correctly returns a nullable type: https://source.dot.net/#System.Linq/System/Linq/First.cs,33
typeof(type).Name is MemberInfo.Name, which is also not nullable: https://source.dot.net/#System.Private.CoreLib/MemberInfo.cs...
I checked both .NET 5 and .NET 6. They have identical nullability.
object[] xs = {};
var n = xs.First();
n.ToString();