2 ms·
> If you're used to exceptions it takes a while to get a feel for the variety of idioms that replace them, particularly the chains of and_then().unwrap_or().map
by nicoburns 7y ago
> If you're used to exceptions it takes a while to get a feel for the variety of idioms that replace them, particularly the chains of and_then().unwrap_or().map().filter().ok().filter_map() that are more familiar for folks coming from pure functional languages.
Coming from JS, this felt familiar to me too: It's virtually identical to how handling errors in Promise chains works.