News for hackers. Stuff that matters.
Re:Where Everything Went Wrong: Error Handling and Error Mes... by heavenlyblue on Friday February 19, 2021 @05:16AM (#26191436)
> Attempting to get the complete set of error types that any given call may raise is a fool's errand because of the halting problem it eventually invokes.

That’s not true.

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.