Comment

Comment by dmatech

This is why it's absolutely essential to always be aware of which types are value types in the .NET type system. Attempts by either users or the designers to conflate or unify them are ill-conceived. The nullability semantics could have been kept consistent if they went all the way back to the beginning of the CLR and did it that way, but this would have not been consistent with Java's JVM and type system (which they were trying to mimic).

That said, we already have value types like System.Int32 which inherit from System.ValueType (an abstract type) which inherits from System.Object (a non-abstract reference type), so things are already a bit weird.

parent dmatech 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton