7 ms·
That's not important in practice. What's important is that null infects all reference types in Java and C#, whether you asked for it or not. Just today I've spe
by LessDmesg 7y ago
That's not important in practice. What's important is that null infects all reference types in Java and C#, whether you asked for it or not. Just today I've spent a half an hour looking for a null dereference error - which the type system should've warned me of but didn't. The sad fact is, neither Java nor C# are fixable, because no new feature will fix the broken, null-unsafe code already written. All because of this billion dollar mistake that should've had no place in a GCed language but was blindly copied over from C++. The sooner Java gives way to Kotlin and completely fades into obscurity, the better.
- howellnick 7y agoC# 8.0 introduced "Nullable Reference Types" (https://devblogs.microsoft.com/dotnet/embracing-nullable-reference-types/ https://devblogs.microsoft.com/dotnet/embracing-nullable-ref...), which, if enabled, can help solve this problem.
- deleted 7y ago[deleted]
- navaati 7y ago> was blindly copied over from C++. From C! AFAIK C++'s references can not be null!