|
|
|
|
|
by bem
5319 days ago
|
|
Checking for null on every method call certainly sounds nuts to me. Furthermore I would argue that doing so decreases consistence in your program. For example, in Objective-C I can count on nil being returned every time I call a method on a nil object. The opposite is true for other languages. The point is, it renders me able to make certain assumptions about how my code will behave, and thereby reduces the amount of code and tests I have to write. Now if the language you're using behaves opposite of your wish, you're either using the wrong language or doing things the wrong way. |
|