Hacker News new | ask | show | jobs
by golergka 1747 days ago
There's a place for both. Error values for conditions that your client will want to handle, and exceptions or panics for all the fatal failures.
1 comments

I don't really understand the place of panics. It's not really up to a function to determine whether its error is unrecoverable (especially in the case of a library), it's up to the caller. And an unhandled Exception is, practically speaking, a panic. So it seems to me that Exception covers both use cases.