Hacker News new | ask | show | jobs
by umanwizard 2199 days ago
In rust, errors are difficult to ignore (you need to either allow compiler warnings, which AFAICT nobody sane does, or write something like `let _ = my_fallible_function();` which makes the intent to ignore the error explicit).

Perhaps more fundamental: it’s impossible to accidentally use an uninitialized “success” return value when the function actually failed, which is easy to do in C, C++, Go, etc.

1 comments

Or .unwrap(), which I see relatively often.
That’s not ignoring errors, it’s explicitly choosing what to do in case of one (crash).