3 ms·
I'm also a fan of this approach, and am currently learning Erlang because of it. However, I do not feel that the approaches are exclusive. Erlang is dynamicall
by staticassertion 10y ago
I'm also a fan of this approach, and am currently learning Erlang because of it. However, I do not feel that the approaches are exclusive.
Erlang is dynamically typed and it is robust because Actors act as isolation boundaries and are managed by supervisors. So the approach is "bugs happen, always recover". You can also use type annotations in Erlang to get "bugs happen less, always recover".
- erikbye 10y agoPerhaps not mutually exclusive, all programmers try to introduce as few bugs as possible; but the philosophy is in fact "let it crash", then you reset to a stable state. Not only is the programmer unburdened of the cognitive load of trying to imagine every single point of failure, but also of the workload of a lot of defensive programming. The whole reasoning behind this is what I said before: in large systems there will always be bugs, errors and failures will happen (some even outside of your code, e.g. power failure). Imagining every point of failure is impossible, so don't try to. Don't write preemptive code. Yes, Erlang is dynamically typed, but not weakly typed.