4 ms·
I think it's a battle of ideologies: Rust wants to be safe, and as a part of that it prefers to Panic than have undefined behavior/memory corruption. Personall
by flumpcakes 4y ago
I think it's a battle of ideologies: Rust wants to be safe, and as a part of that it prefers to Panic than have undefined behavior/memory corruption.
Personally I would prefer my pacemaker to miscount a beat than shutdown completely...
There are some people who would prefer the purity of "Panic" on a memory corruption/error, and there are some people who are operating space craft and safety critical systems where a "Panic" could lose lives.
This is why I don't buy-in completely with claims of safety, when we've been using Assembly/C/C++/Ada/etc. for decades. It's a trade off and you're not going to stop cosmic rays flipping your bits.
- dmm 4y ago> Personally I would prefer my pacemaker to miscount a beat than shutdown completely... A panic doesn't imply shutting down. If my api panics a system above it(systemd, docker, k8s) restarts the api from a known good state. Memory corruption can do much worse.
- AnimalMuppet 4y agoOr a hardware watchdog. "A system above it" doesn't have to be software.
- salawat 4y agoCool, what'a above the kernel? Note: Hypervisor is not the right answer.
- flumpcakes 4y agoWhen an OS kernel panics it usually means some kind of catastrophic loss, often requiring a reboot. Precisely because the Linux kernel tries to continue in all cases. As Linus has made quite direct comments on this: a language with run time panics will not be accepted into the Linux kernel.
- fiedzia 4y ago> There are some people who would prefer the purity of "Panic" on a memory corruption/error, If the OS will encounter memory corruption, it cannot reliably do anything but restart. Anything else will risk further corruption and will make any investigation more difficult and effects more distant from the cause. > and there are some people who are operating space craft and safety critical systems where a "Panic" could lose lives. So could erratic behaviour.