Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

IMO Erlang/Elixir does it best with the "let it crash" mentality. Once you internalize and truly understand how it works, you won't want to do error handling in any other way. The tldr; handle errors you can handle, let everything else crash and rely on the runtime to bring you back online.

The zen of erlang (https://ferd.ca/the-zen-of-erlang.html) goes more in depth if you're curious.



The conflict here is situations, like in Rust, where you don't have that runtime in the first place, so you cannot do this.

Rust used to be much more Erlang-like in this regard back in the days when it had such a runtime, but when the runtime was removed, so was the ability to work like this.


Yeah, usually the supervisor just restarts what it should, and the error is logged. That is enough for me, to be honest.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: