3 ms·
Rust will allow you to ignore a Result as well, to be fair, though with a compile time warning. I don't think I know any language that'll throw a compiler error
by jeroenhd 5y ago
Rust will allow you to ignore a Result as well, to be fair, though with a compile time warning. I don't think I know any language that'll throw a compiler error at you if you ignore the return value of a function that indicates success or failure.
- steveklabnik 5y agoLanguages with "linear types" would, but there aren't any mainstream ones. (And, to be extra clear, it only lets you ignore a Result if you don't care about the Ok value, if you want to use it, it does not.)