Pelle Månsson wrote:
On 11/05/2010 03:04 PM, Kagamin wrote:
Pelle Månsson Wrote:
Getting the error early is actually a lot better than getting the error
late.
OK, but it doesn't reduce the number of bugs. You had an error with
nullables and you still has error with non-nullables.
But in the non-nullable version you actually know where the bug is,
namely where you assign the null to the thing that shouldn't be null.
The segfault can come from any unrelated part of the program whereto
your null has slipped, at any later point in time.
I've always found it very easy to work out where a null came from. What
I would hope from a non-nullable type is to eliminate rare code paths
where a null can occur, which might not show up in testing.