0
Answered

Introduce null objects

Abelardo León González 7 years ago updated by Marina Pavlova 7 years ago 1

According to this idea, should we create null classes for all classes????
Does it make sense?
¿?

Answer

Answer
Answered

Hello again, Abelardo.


It mostly makes sense if your code has a lot of conditionals that check whether an object is null and perform some action if so. This "default" behavior usually fits well inside a null object.

Answer
Answered

Hello again, Abelardo.


It mostly makes sense if your code has a lot of conditionals that check whether an object is null and perform some action if so. This "default" behavior usually fits well inside a null object.