logoalt Hacker News

Panzerschrek • today at 7:44 AM • 1 reply • view on HN

> But many operations in Rust can panic, from out-of-bounds indexing to calls into user-provided code, and by default a panic unwinds

That's why I think having unwinding in Rust is a mistake. It gives a false sense of safety, but it's very hard to write unwinding-correct code. So, it would be better to handle panics as immediate process termination instead.


Replies

Xirdus • today at 8:15 AM

But that would make Rust unsuitable for writing anything that wants to keep the program running even if something does panic - say, test harness, or a plugin system.

➕ show 1 reply