Re:Where Everything Went Wrong: Error Handling and Error Mes...
by im3w1l on Friday February 19, 2021 @05:43AM
(#26191631)
Yeah, it only becomes an issue if you want the compiler to infer that ImpossibleError cannot be raised in
while True: pass
raise ImpossibleError
But normally we are perfectly content to put ImpossibleError in the signature for code like this.
Re:Where Everything Went Wrong: Error Handling and Error Mes...
by heavenlyblue on Friday February 19, 2021 @01:25PM
(#26196188)
Actually in this specific case you can infer that, and you can have an exhaustive list of language constructs beyond which this becomes undecidable.
There is a practical example of “panic!” in Rust to go around that as well.
That’s not true.