Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> A well defined domain model should indicate what that structure represents.

"Should", but does it? If a function returns Option<HashSet<UserId>> I know immediately that this function may or may not return the set, and if it does return the set, they are unique.

This is a fact of the program, I may not know "why" or "when" it does what. But as a caller, I can guarantee that I handled every possible code path. I wouldn't get surprised later one because, apparently, this thing can throw an exception, so my lock didn't get released.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: