4 ms·
The idea is not to crash the entire program, but the part of it that has gotten itself into a bad state. Look at the Cowboy web server for instance: it doesn't
by davidw 12y ago
The idea is not to crash the entire program, but the part of it that has gotten itself into a bad state. Look at the Cowboy web server for instance: it doesn't just fall over in its entirety if a request handler barfs for some reason.
You'd want the UI to not crash, and show a nice error message:
http://joearms.github.io/2013/04/28/Fail-fast-noisely-and-politely.html http://joearms.github.io/2013/04/28/Fail-fast-noisely-and-po...
- erikb 12y agoOkay, but that's exception and exception handling not crashing. Crashing means the whole program dies. I can understand if the term "crash" is defined differently in Erlang world, but I don't understand why Erlang citizens don't know that the rest of the world calls that "exception" and that "exception handling" is implemented in many high level languages by default, doing exactly as the article explains you should be doing it. I mean, Erlang people also know other languages, right? I think there are more Erlang experts who know C++ than C++ experts who know Erlang.
- davidw 12y agoErlang has exception handling too, try/catch kinds of constructs. It's different, though, than what Erlang does with its "let it crash" philosophy. http://www.erlang.org/download/armstrong_thesis_2003.pdf http://www.erlang.org/download/armstrong_thesis_2003.pdf Specifically, the bits about "Let it crash".