9888 shaares
248 private links
248 private links
There are 3 error or exception handling: unchecked exceptions (JS), Checked Exceptions (Go) or an integrated type (Result in Rust) that handle one case or the other.
Explicit is always better.
One thing with an integrated type, is the normal case and the other case. That's a great type to handle more than errors: a lookup of a key in a map, opening a file with a name for which there is no file is normal business. Maybe I will find more.
And for quality software, its function must be so blatantly obvious that everybody thinks: wow, this is trivial code, even a monkey could've programmed this.