2 ms·
Yes, by all means force people to check for nulls when null is a semantically valid value! But much more importantly, in statically typed languages, allow peopl
by Sharlin 12y ago
Yes, by all means force people to check for nulls when null is a semantically valid value! But much more importantly, in statically typed languages, allow people to distinguish between nullable and non-nullable types to prevent the most common null safety issue: accidentally passing a null value into a routine whose precondition forbids null, or storing null in a variable whose invariant forbids null.
- eudox 12y agoEssentially this. Some pointers are null, some are not, and the type system should let you express this.