3 ms·
> There are only two ways to handle this - return values and exceptions - and they differ in style more than in functionality. "There are only two" is a bit st
by swift 14y ago
> There are only two ways to handle this - return values and exceptions - and they differ in style more than in functionality.
"There are only two" is a bit strong. Off the top of my head I can think of conditions and restarts in e.g. Common Lisp (to be fair, these are a generalization of exceptions) and monads in e.g. Haskell. I'm sure there are others I'm forgetting.