3 ms·
Welcome to the idea of the "null object". It's an object which satisfies all of the use cases of the null value but doesn't cause you to litter nearly every lin
by InclinedPlane 16y ago
Welcome to the idea of the "null object". It's an object which satisfies all of the use cases of the null value but doesn't cause you to litter nearly every line of your code with defensive null checks to avoid your program randomly barfing. When done right it's a far more elegant solution than "null".