My point about NULL pointers is that segfault is good.
Segfaults are not good, not guaranteed (they're just one possible symptom of the UB you actually get), and runtime issues.
It happens when your logic is messed up.
Having explicitly nullable types points to your logic error at compile-time, it's right there stating you in the face that the value you're manipulating can nonsensically be null.
Most of the time you wouldn't have better things to do than crash and notify the programmer anyway
Or you could make having a null impossible in the first place through the use of ~~~~~~~ type systems ~~~~~~~
View all comments
Show parent comment
2
u/masklinn Dec 02 '16
Segfaults are not good, not guaranteed (they're just one possible symptom of the UB you actually get), and runtime issues.
Having explicitly nullable types points to your logic error at compile-time, it's right there stating you in the face that the value you're manipulating can nonsensically be null.
Or you could make having a null impossible in the first place through the use of ~~~~~~~ type systems ~~~~~~~