3 ms·
There's a design pattern, known alternately as Null Object or Special Case, related to this. The general goal is to eliminate the need to add checks for null/NA
by cratermoon 3y ago
There's a design pattern, known alternately as Null Object or Special Case, related to this. The general goal is to eliminate the need to add checks for null/NA/sentinel and simply define valid behavior for these cases. Eliminating boundary checks both simplifies the code and improves performance.