Re:Bugs that the Rust compiler catches for you
by elbear on Friday May 06, 2022 @01:07AM
(#31281522)
There's a difference between what you should do and what people actually do. If a lot of them use unwrap in production, then OP's argument is valid.
[ Parent
| on HN ]
Re:Bugs that the Rust compiler catches for you
by nulld3v on Friday May 06, 2022 @01:22AM
(#31281588)
The problem would not be that it is commonly used, the problem would be that it is abused. And I don't see that happening currently.
The assertion that "If a library panics on user data, that's a pretty serious bug" remains true.
If a library is panicking on invalid user data, it is because they are abusing panic, which is a serious bug. Or they just didn't realize that their code could panic, which is also a serious bug.