Never null

Can we make it a practice to never return a null from anywhere? Maybe, we need a campaign similar to polio's to eradicate nulls. It’s very expensive and turned out to be a multi-billion dollar mistake made by our industry.

Even in today’s times, there could be some very rare valid scenarios where a null can be applicable. But, not like one below. In case of a null collection, we can instead return an empty one. 

Add comment