1

Assert ref != NULL rather than conditional check it more often.

Silently returning / ignoring is way worse if object was meant to be valid.

The caller should deal with it. (As abstract as possible preferably...)

Obviously there's places where conditional is necessary.. but silent null checks can cause more pain than good.

Comments
Add Comment