3 ms·
In Elixir, error handling is considered “code smell.” I’ll take a second to let you read that again. I think that this makes a lot of sense. My experience in j
by stcredzero 10y ago
In Elixir, error handling is considered “code smell.” I’ll take a second to let you read that again.
I think that this makes a lot of sense. My experience in just about any language, is that the official means of error handling already feels like a code smell, even before you start using it. And if that's not the case, then it still manages to feel that way when used in a large project.
Lots of Smalltalk projects would actually handle errors by saving the image on an unhandled exception. For server applications, this was like having a "live" core dump where the debugger could open up right on the errant stack frame, and you could perform experiments to aid in debugging.
- digitalzombie 10y agoFunny you mentioned smalltalk. Alan Kay was talking about how Erlang is really an OOP language more so than other languages. In term of message passing and each process is an object... Erlang just let it crash and you can restart it with a supervisor process. I think most of the time this model is much better since you won't be doing numerical stuff with BEAM anyway, it's not for it and it's too slow.