4 ms·
Considering how many null pointer bugs I've seen, I think that this is a case where absence of evidence is not evidence of absence (at least for null safety).
by slaymaker1907 4y ago
Considering how many null pointer bugs I've seen, I think that this is a case where absence of evidence is not evidence of absence (at least for null safety).
- chrisseaton 4y agoThere's no evidence of the absence of the easter bunny, but we are happy that he probably doesn't exist since there's an absence of evidence. Write up your experience with null safety as a paper and submit it, because this would be a world-first if you can demonstrate it.
- wtetzner 4y agoI’m not really sure what you’re arguing. You seem to be saying that since we can’t prove that one approach is better than the other, we should just assume they’re all equal. We do have proofs that certain classes of bugs are impossible given a certain type system.
- BlargMcLarg 4y agoAlmost all of the null pointer errors I've seen came from not fully thinking things through. I can see the same mistakes happening with non-nullable types because someone got lazy and passed a default value or something. You get the benefit of the compiler shouting at you for not initializing a variable, but that won't necessarily protect you from not thinking every situation through / lazily passing default values / making poor assumptions. I'm with GP, I'd really like evidence of this before people continue shouting things which aren't proven.
- ReactiveJelly 4y agoBut the languages that are null-safe all have Option, Optional or Maybe. So if I do need a null value, I can make the field optional and the type checker will help me figure it all out.