3 ms·
Crash-only software works for Erlang, and I think people expect telephony switches to be reliable. (Swift also crashes on overflows and runs your phone.) Most
by astrange 3y ago
Crash-only software works for Erlang, and I think people expect telephony switches to be reliable. (Swift also crashes on overflows and runs your phone.)
Most of your examples would be just as bad if they started having unbounded incorrect behavior, and an overflow you didn't know about could lead to that. So don't get the math wrong!
- cesarb 3y ago> (Swift also crashes on overflows and runs your phone.) AFAIK, over half of the mobile phones in the world, and probably nearly all of the fixed phones, do not run Swift, but instead some older language which does not have this "crash on overflow" behavior.
- lxgr 3y agoMany landline and mobile phone switches do run on Erlang. Not getting a connection in case of e.g. an integer overflow for "pick the next available trunk line" is preferable to kicking out an existing connection on line 0. Note that an exception doesn't need to literally mean "the entire system comes to a screeching halt": You'd usually limit exception handling to the current operation.
- torstenvl 3y agoNobody is talking about exceptions. We're talking about intentionally invoking undefined behavior. You don't use trap representations to handle potential overflows. You check for possible overflow prior to the operation, and then handle appropriately.