2 ms·
As the other comment says, that's exactly what's done with unwrap and try. You do obviously have to write that out, but on the other hand that means you know wh
by rvense 10y ago
As the other comment says, that's exactly what's done with unwrap and try. You do obviously have to write that out, but on the other hand that means you know where to add the error handling when you come back after the fact. It might take a little getting used to, but it's a decent compromise. I'd say it's a matter of taste, but yeah, there are a few more characters there.
- MichaelGG 10y agoCouldn't there be an opt-in Deref for Option and Result? Then you could just pretend everything unwrapped fine.