Error outputs from babies crying are loud and unspecific, akin to debugging in programming. Defining errors, faults, and failures by IEEE standards, the author delves into error prevention measures like testing and static type systems. Emphasizing that errors are almost always due to faults, the importance of handling failures correctly is highlighted. Programming languages like Rust and Haskell excel at fault prevention. The distinction between faults and failures leads to a critique of exceptions and the importance of proper failure handling. The necessity of restarting programs to eliminate errors is emphasized, with exception handling seen as inadequate. The author suggests approaches to prevent faults, such as expanding codomains, and advocates for Erlang’s failure handling model. Exceptions are criticized for mixing error handling concerns and not effectively handling failures. Ultimately, the goal is to architect software for proper failure handling and avoid unnecessary restart loops.
https://btmc.substack.com/p/you-cant-handle-errors