Erlang's let-it-crash philosophy - applicable elsewhere?

后端 未结 7 2120
感情败类
感情败类 2020-12-12 12:39

Erlang\'s (or Joe Armstrong\'s?) advice NOT to use defensive programming and to let processes crash (rather than pollute your code with needless gu

7条回答
  •  感情败类
    2020-12-12 13:18

    It is called fail-fast. It's a good paradigm provided you have a team of people who can respond to the failure (and do so quickly).

    In the NAVY all pipes and electrical is mounted on the exterior of a wall (preferably on the more public side of a wall). That way, if there is a leak or issue, it is more likely to be detected quickly. In the NAVY, people are punished for not responding to a failure, so it works very well: failures are detected quickly and acted upon quickly.

    In a scenario where someone cannot act on a failure quickly, it becomes a matter of opinion whether it is more beneficial to allow the failure to stop the system or to swallow the failure and attempt to continue onward.

提交回复
热议问题