Elixir/Erlang's 'Let It Crash' vs. Go's Explicit Error Handling

Erlang/Elixir, built on the BEAM VM, prioritizes fault tolerance with a 'let it crash' philosophy and supervision trees, enabling self-healing systems designed for telecom-grade uptime. In contrast, Go relies on explicit error handling, where an unrecovered panic in a goroutine can potentially crash the entire application.

The top 3

  1. Erlang's 'Let It Crash': Telecom's 99.999% Uptime Origin: The 'Let It Crash' philosophy in Erlang (and Elixir) originated from Ericsson's need for highly fault-tolerant telecommunication systems requiring 'five nines' (99.999%) availability. This approach, enabled by supervisor trees, prioritizes system resilience by automatically restarting isolated failed processes rather than attempting in-process error recovery, ensuring continuous service even during failures.
  2. Go's Explicit Handling: Predictability vs. Erlang's Resilience: Go emphasizes explicit error return values and the `error` interface, compelling developers to handle failures locally and precisely, fostering predictable control flow. This contrasts with Erlang/Elixir, where errors typically cause a process to crash and rely on a supervisor higher in the hierarchy to detect and restart it, prioritizing system-level resilience over individual component perfection.
  3. Debugging Battle: Erlang's Supervisor Trees vs. Go's Error Chains: Erlang/Elixir leverages hierarchical supervisor trees to automatically restart failing processes, simplifying debugging by localizing faults and restoring clean states. Go's explicit error returns create traceable chains, requiring developers to manually follow each error value up the call stack for debugging.

Sources

Open the full topic