4 ms·
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
by kbyatnal 6y ago
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 https://ferd.ca/the-zen-of-erlang.html) goes more in depth if you're curious.
- steveklabnik 6y agoThe 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.
- johnisgood 6y agoYeah, usually the supervisor just restarts what it should, and the error is logged. That is enough for me, to be honest.