Null Object Design Pattern is cargo cult programming
Nuestro buen amigo Javier Caceres nos comparte su artículo:
I like the notion behind the Null concept. Null does not mean anything. Null does not mean empty. Null means a reference to nothing but it’s still something between us. Null has the same effect on us that the black holes because it makes people think about it in different ways. Some people consider Null a good return value, some others consider it an error sign and more time you spend in the software industry more meanings you find.
To me Null it just like another constant value that it particularly warns about an undefined status. To me Null means “undefined” in the same manner that zero specify the smallest non negative number. However cargo cult programmers have created funny definitions around it and Null has evolved to a design pattern. The following implementation shows a sample of the Null Object design pattern.
Ver más aquí.
Fernando García Loera (Community Program Manager – Latin America Region)