News for hackers. Stuff that matters.
Re:How “let it fail” leads to simpler code by winter_blue on Tuesday July 19, 2022 @12:46AM (#32147641)
In non-pure code, we would want to force the programmer to handle the exception.

In this case, wherever `throw_exception` is called, the programmer would have to handle the exception, and either refactor the return value to indicate an error, change the return value to an Optional (and silently fail by returning an empty Optional), or cause/trigger a side effect (like terminating the thread/program termination early, with an exit code).

There are no comments on this comment yet.