Rust: Error Handling, Ditching Exceptions for Result and Option
In many programming languages, errors are treated as an afterthought. If a file is missing or a network request fails, the language throws an “Exception,” abruptly halting the normal flow of the program. If you forget to wrap that code in a try/catch block, your entire application crashes. Worse still is the billion-dollar mistake: the null value. Trying to access a value that happens to be null is a leading cause of software crashes worldwide. ...