Hacker News new | ask | show | jobs
by The_Colonel 1045 days ago
> It sounds like badly documented code then. A function, especially if some kind of API boundary, should absolutely state whether it can or can’t return null.

Of course, in the type system.

Just like we're "documenting" types themselves in the type system and not in JavaDocs.