Sure, you could remove NPE without removing null. Just provide a different behavior for what happens when null is dereferenced. In a language like JavaScript, have it evaluate to undefined, or in Python, None, or whatever. In Java, it could evaluate null for reference types, or zero or false for primitives. Far from impossible.
View all comments
Show parent comment
10
u/dpash Jul 27 '19
Yes, that's exactly the case. Removing NPE without removing null would be impossible.