> It may sound stupid, but you can't have unhandled exceptions if you don't have exceptions...

> panic!() exists in Rust, but that's not how recoverable errors are handled.

This is the worst argument in the whole article, and this is the worst part of the language. Everyone says it's not like exceptions, but in fact it is much worse. Panic is stringly typed and you can catch_unwind it, just like with try/catch in any other language. And the actual worst part of it, you will never know if a panic can occur in any of the underlying functions until it is too late. Developers be damned if they want to choose different behaviour other than crashing the whole program.

Either double down on using the standard error handling everywhere, or put something like "throws panic" in the function signature (ala Java checked exceptions). Many parts of the language has strict checks for everything, why does panic has to be an outlier?

I just wish there was an ergonomic way of saying “Please check if the following code can possibly panic, and fail to compile if it can.”

That would allow critical sections that happen to use a library not to need to audit all the code in the library for panics.

You might be interested in Prusti: https://github.com/viperproject/prusti-dev