I will say this: for me, learning rust was 80% un-learning habits from other languages.
People tend to not like it when they have to change habits, especially if those took a long (and painful) time to acquire.
In this particular case, this is the same complaint Go faced with its form of explicit error handling. And Java, for that matter.
Honestly, Rust does a killer job of avoiding checked exceptions and verbose error hooks by way of the ? operator, and requiring all possible match branches to be accounted for. If you embrace errors fully, by using Result<> and custom Error types, your program gets a massive boost in robustness for not a lot of fuss. I recently learned that it gets even better if you embrace enum as a way to define error values, and make sure it implements useful traits like From and Display. With that, error handling code gets a lot more succinct, permitting one to more easily sift through different error values after a call (should you need to). All of that capability far exceeds any perception of clunkyness, IMO.
I will say this: for me, learning rust was 80% un-learning habits from other languages.
People tend to not like it when they have to change habits, especially if those took a long (and painful) time to acquire.
In this particular case, this is the same complaint Go faced with its form of explicit error handling. And Java, for that matter.
Honestly, Rust does a killer job of avoiding checked exceptions and verbose error hooks by way of the
?
operator, and requiring all possiblematch
branches to be accounted for. If you embrace errors fully, by usingResult<>
and custom Error types, your program gets a massive boost in robustness for not a lot of fuss. I recently learned that it gets even better if you embraceenum
as a way to define error values, and make sure it implements useful traits likeFrom
andDisplay
. With that, error handling code gets a lot more succinct, permitting one to more easily sift through different error values after a call (should you need to). All of that capability far exceeds any perception of clunkyness, IMO.