Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That may be me, but `.unwrap()` is much more obvious than `_`:

- it's literally written out that you're assuming it to be Ok

- there are no indications that the `_` is an error: it could very well be some other return value from the function. in your example, it could be the number of appended features, etc

That's why Go's error handling is indeed noisy: it's noise and you reduce noise by not handling errors. Rust's is terse yet verbose: if you add stuff it's because you're doing something wrong. You explicitly spelled out the error is being ignored.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: