4 ms·
I wonder if this type signature may be too intimidating for newcomers: Result<(), Box<dyn std::error::Error + 'static>> It's probably huge effort to somehow t
by methyl 6y ago
I wonder if this type signature may be too intimidating for newcomers:
Result<(), Box<dyn std::error::Error + 'static>>
It's probably huge effort to somehow target examples both for newbies and advanced users. I don't know what's good solution and if it's a real problem at all.
- jkelleyrtp 6y agoRust is a language that you need to sit down and read the book. It's not for casual exploration in the same way that JS/Py are. People in the Rust ecosystem will tell you to either unwrap the error or use https://docs.rs/anyhow/1.0.34/anyhow/ https://docs.rs/anyhow/1.0.34/anyhow/ to completely ignore it. Great thing - it's simple to ctrl-f and turn your one-off code into production code with powerful errorhandling.
- deleted 6y ago[deleted]
- brundolf 6y agoIt's a language where it's worthwhile to sit down and read the book, but it aspires to be fairly accessible too via zero-cost abstractions and integrated tooling. I think it's been moderately successful in this goal all things considered, but there's always more progress to be made.
- steveklabnik 6y agoYes, normally I would hide that. Not sure why it wasn't here. I'll make a ticket :) Thanks!