4 ms·
> I don't understand the practical consequence Well I did link to a blog post that explains this, so I feel like it's sort of on you at this point. But I guess
by staticassertion 6y ago
> I don't understand the practical consequence
Well I did link to a blog post that explains this, so I feel like it's sort of on you at this point. But I guess the short answer is that in Rust you know exactly what 'unwrap' will do on a None, and in C/C++ you can't.
> can you imagine your long running application (e.g a server) stopping in production..
Yes. It happens all the time, and in fact it is inevitable. Far better than the program misbehaving, which is what undefined behavior leads to. In fact if you're building a serious, production service, you might want to skip panicking altogether and just kill the process.