Hacker News new | ask | show | jobs
by tinco 1504 days ago
Rust has syntactic sugar to help you coalesce error handling into returning a single Result. You'd have to check and make sure the library you use doesn't call unwrap willy nilly. As crazy as that sounds it is actually common practice in the Rust community, there's tools that reveal use of unwrap and unsafe in your dependencies.

In the end you don't use Rust because it's so easy and nice to use (unless you come from C/C++). You come to Rust because you want meticulous control over performance, and you don't want to sacrifice safety to attain that.

If that's not why you're using it, I agree you're probably better off choosing Java, it's plenty fast and comfortable to use, especially if you pick modern tooling.

1 comments

> You'd have to check and make sure the library you use doesn't call unwrap willy nilly.

That statement really resonates with me. If you use a library, you’re responsible for what it does, just like how you’re responsible for your own code.