Hacker News new | ask | show | jobs
by dsymonds 4761 days ago
"has to" is a bit strong. The standard assumption is that pointer arguments should be set (or the function is documented otherwise), and the responsibility is left with the caller. It just bubbles out from there.
1 comments

Yes, this is the way things have been done since 1965. It sounds simple enough, but as it turns out, in complex systems, this is a common cause of defects.

Programmers forget to check things all the time. Assumptions made in different areas of the code, by different programmers, at different times, do not always hold.

Fortunately, computers are good at remembering to check things. We just need to allow them to do so.