4 ms·
In any program there are errors you can handle and errors you can't, errors whose vary existence suggests something has gone horribly wrong. What else should yo
by LAC-Tech 2y ago
In any program there are errors you can handle and errors you can't, errors whose vary existence suggests something has gone horribly wrong. What else should you do in that situation but panic?
- kortilla 2y agoI see unwrap used all of the time on things that could be recoverable if people bothered to write the control flow. “Meh, let the program crash” is easier because unwrap is much less verbose than the match unpacking or carrying results to callers. Rust has exceptions, they are just named Result and people just as frequently decide not to handle error results as not catch exceptions in my experience. Typed exceptions are just as good as what rust offers IMO.