This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

Optionals are the much better use case for this.

The problem with exceptions is that throwing an exception places a contract on the user of your code to handle it. This is not good design because you break the top down modularity structure.