magic starSummarize by Aili

Failures, Mistakes, Confusion

๐ŸŒˆ Abstract

The article discusses the confusion around different "error handling models" in programming, and argues that the common practice of conflating two separate concepts - failures and mistakes - into a single "error" system is problematic.

๐Ÿ™‹ Q&A

[01] Failures vs. Mistakes

1. What is the distinction between failures and mistakes in programming?

  • Failures happen when the system fails to perform an action due to some constraint (physical, security, business, etc.). Failures cannot be proven to never happen and are usually explicitly communicated.
  • Mistakes are faults in the code that break explicit and implicit invariants. Large classes of mistakes can be proven to never happen. Mistakes may be explicitly communicated when an invariant check fails, or may result in immediate effects without communication.

2. How are failures and mistakes typically treated in programming?

  • Failures and mistakes are often mashed together into a single "error" concept, except in static analysis where only mistakes can be detected.
  • Failures and mistakes are predominantly communicated via the same channels, and invariant checking is often done alongside checking for constraints, further blurring the distinction.

3. What are the implications of conflating failures and mistakes?

  • Failures and mistakes have very different properties in terms of what they mean and how they should be handled, but treating them as a singular "error" concept can be problematic.
  • The author suggests that there may be benefits in separating these concepts more clearly, but does not provide specific solutions.

[02] Potential Solutions

The author does not propose any specific solutions, but rather raises the issue in the hopes that others will start thinking about it and explore ways to better distinguish between failures and mistakes in programming error handling.

Shared by Daniel Chen ยท
ยฉ 2024 NewMotor Inc.