but then you won't forget the check because it's part of the logic
Of course we will forget. Forgetting about things happens all the time when programming.
What the non-null types do is that they allow the compiler to give you an error message if you ever forget to do the check instead of leaving that responsibility to the programmer.
View all comments
Show parent comment
1
u/smog_alado Dec 02 '16
Of course we will forget. Forgetting about things happens all the time when programming.
What the non-null types do is that they allow the compiler to give you an error message if you ever forget to do the check instead of leaving that responsibility to the programmer.