4 ms·
Java tries so hard to be backwards compatible, I think null is here to stay. There is always Kotlin if you want better null safety, or compile time checks like
by MarkMarine 5y ago
Java tries so hard to be backwards compatible, I think null is here to stay. There is always Kotlin if you want better null safety, or compile time checks like null-away, but they are still null adjacent. Disappointing but that’s what we’re stuck with in service of backwards compatibility, but I’m not sure making these breaking changes is an improvement… look at Python 2->3 for an example
- suyash 5y agoyes and most java developers have come to terms with null and NPE, it's just part of programming in Java so honestly I'm fine with it being here.
- Cojen 5y ago...and now that NPE has a "helpful" message, I've generally found it to be almost a non-issue these days. During development, I can usually figure out the problem immediately just from the message and I don't need to examine the stack trace.