https://gist.github.com/pkoch/ed52f4635a92d1028d511363efee9758
There's a few codebases I've worked on that don't give errors enough consideration, and details about them are readily swept under a carpet. They return None
left and right, regardless of what came in their way. This lack of consideration and communication of the nature of the problem makes dealing with it largely impossible.
I consider that, until the end of last decade, ergonomic error handling in programming languages (and respective standard libraries) has felt mostly like an afterthought. Some of them (/me looks menacingly to PHP and JavaScript) tried to pretend they didn't have to be a thing. Things are now feeling differently, especially so when I look at Rust and Swift.
I have a clear idea of how to "do errors right". This is me expressing my opinion.
When talking about errors, I often see incoherent terminology, so I'll establish my own. These are all leaky buckets -- I can't really offer formal definitions -- but I ne