3 ms·
> My biggest complaint against the language hasn't changed, which is dealing with different Error types Do you mean syntactic sugar? Because there's try! and ?
by AsyncAwait 10y ago
> My biggest complaint against the language hasn't changed, which is dealing with different Error types
Do you mean syntactic sugar? Because there's try! and ?
Or do you mean dealing with Option and Result in a more uniform way?
- bluejekyll 10y agoSo error_chain! is actually the answer to most of my issues with it, but it was the largest hurdle for me (coming mainly from Java) where you need to convert from one type to the next up the return stack. It took me a while to get used to this, but I'd say it's a large hurdle when learning the language. And, while error-chain is great, it means introducing you to macros and such if you try to adopt it early on. Mind you, this is my biggest complaint, and it's trivial for me now, but after you grok the other major features of the language, properly dealing with errors/results is a hurdle for people new to the language. link: https://docs.rs/error-chain/0.7.2/error_chain/ https://docs.rs/error-chain/0.7.2/error_chain/