3 ms·
null references are a problem when: - null is a valid member of every type - there's no way to constrain a reference to only non-null members of the referenced
by tadfisher 4y ago
null references are a problem when:
- null is a valid member of every type
- there's no way to constrain a reference to only non-null members of the referenced type
- the compiler allows dereferencing values of a nullable type
Weirdly, all three are true of C, C++ and Java.
- GoblinSlayer 4y agoNull is a valid member of every type only in Java. C and C++ have value types.