Erlang / Erlang Basics Interview questions
Describe the "let it crash" philosophy?
"Let it crash" means Erlang code generally doesn't try to defensively handle every possible failure inline. Instead, when a process hits an unexpected state, it's allowed to terminate, and a supervisor detects that exit and restarts it fresh.
The reasoning: trying to anticipate and recover from every edge case inline bloats code and often masks bugs
by leaving the process in a half-corrupted state. Restarting from a clean init/1 is usually safer
and simpler than trying to patch a process back to a known-good state after something goes wrong.
This doesn't mean errors are ignored — it means error handling is separated from business logic and pushed up to a supervisor, which is exactly what supervision trees are designed for. It's why gen_server callbacks are often written for the "happy path" and let genuinely exceptional input simply crash the process.
More Related questions...