4 ms·
Good advice in here. The focus on assertion-oriented programming is interesting. Erlang doesn't have assertions available in application code directly, but I th
by slondr 3y ago
Good advice in here. The focus on assertion-oriented programming is interesting. Erlang doesn't have assertions available in application code directly, but I think structure-enforced assignments are really similar in practice.
- fredrikholm 3y agoYes! The reasoning behind 'let it crash' is just this; assume happy path destructuring (effectively asserts) and let the supervisor(s) decide what happens to a process that crashes. Now you have very explicit expectations and contracts on data, yet the code is very straight forward and easy to reason about. Layering OTP on top means you can now decide how you react to one-off errors and when you're drowning in bad data. I love it.