4 ms·
> given the built-in "succeed or die" macros that simplify code at the cost of reliability. I would consider a program that dies early to be more reliable (but
by kelnos 7y ago
> given the built-in "succeed or die" macros that simplify code at the cost of reliability.
I would consider a program that dies early to be more reliable (but less robust) than one that just soldiers on, probably doing wrong (and possibly dangerous) things.
Regardless, it is the programmers choice whether to call panic!() or to try to handle an error gracefully and continue.
- kragen 7y agoIt depends on the situation. Ariane 5 was destroyed because its inertial reference system (written in Ada) died early instead of soldiering on, and as it turns out, it would have been fine if it had soldiered on. Really, there's a certain amount of software, like the Ariane 5 SRI, for which the only acceptable outcome is not to have the error in the first place — there's no acceptable way to handle it once it happens. That software is very expensive to write, so you want to keep it to a minimum in the overall system, but sometimes you cannot avoid having some of it.