3 ms·
The process hierarchy is a big part of what makes coding in a "let it crash" style possible, and AFAIK it's fairly unique to Erlang (though some other languages
by silentbicycle 17y ago
The process hierarchy is a big part of what makes coding in a "let it crash" style possible, and AFAIK it's fairly unique to Erlang (though some other languages have copied it).
Pattern matching is another big part of it, but several other languages did pattern matching first.
- davidw 17y agoSure, but if you're talking at a high level, what is the "let it crash" stuff good for at a practical level? I think I'd put it under 'fault tolerance', but maybe there's another category I should add? The original poster mentions I left it out, so it'd be fair to add it, but it needs a high-level, practical label to put it under.
- silentbicycle 17y agoFault tolerance and declarative programming. It's easier to write code that clearly expresses your intent when you don't need to clutter it with error-handling code. Likewise, pattern matching completely eliminates complex layering of nested 'if' statements, and is an alternative solution to the kinds of problems typically solved with polymorphic dispatch in OO languages.
- gordonguthrie 17y agoThe first key point about 'let it crash' is that you drive towards zero-defect programming. Every time the system walks away from the happy path you crash write a log. Every day with our production systems we check the live production logs to identify defects that we try and remove. The second key point about 'let it crash' is that with OTP your system is always macro stable. Even if every function is only a stub and every stub contains exit(bleh) and always fails at a micro level, your system is always macro stable - the gift that keeps on giving!