3 ms·
It's a more obvious problem in typed languages like C or Java, where the type system can't help much to protect you against null pointer exceptions if you forge
by ufo 6y ago
It's a more obvious problem in typed languages like C or Java, where the type system can't help much to protect you against null pointer exceptions if you forget to check for null. Specially in C, where the null pointer exceptions cause billions of dollars of damage in the form of segfaults and nasal demons.
In a language like Python the possibility that variables may contain values of different type (such as the None value) is part of the game. An inherent tradeoff of being dynamically typed.