[erlang-questions] Idiomatically handling multiple validation checks
Richard A. O'Keefe
Tue Dec 6 23:59:27 CET 2016
Joe Duffy of Microsoft gave a talk about systems programming in C#.
(He worked on a project that built an operating system + utilities
in C#.) The talk is at
He had some interesting things to say about exceptions and errors.
* Exceptions are meant for recoverable errors;
but many errors are not recoverable!
* A bug is an error the programmer didn't expect;
a recoverable error is an expected condition,
resulting from programmatic data validation.
* Treating bugs and recoverable errors homogeneously
creates reliability problems.
* If you’re going to fail, do it fast.
* Exceptions [can] delay the inevitable and invite abuse.
* Fail-fast ensures bugs are caught promptly before they
can do more damage.
* In [their] experience, 1:10 ratio of recoverable errors
(exceptions) to bugs (fail-fast).
Apart from that, I really liked zxq9's response.
More information about the erlang-questions