2024-11-14 π programmerhumor β RE: TimeSquirrel
I thought those were for only when shit is seriously wrong and execution canβt continue in the current state.
Thatβs how it starts. Nice and simple. Everyone understands.
Until
some resource was in a bad state
and you decide you want to recover from that situation, but you donβt want to refactor all your code.
Suddenly, catching exceptions and rerunning seems like a good idea. With that normalized, you wonder what else you can recover from.
Then you head down the rabbit hole of recovering from different things at different times with different types of exception.
Then it turns into confusing flow control.
The whole Result thing from Rust is a nice alternative.
https://doc.rust-lang.org/book/ch09-00-error-handling.html
No replies.
ββββ
ββββ