Twitter | Pretraživanje | |
Benjamin Brittain
Migrating our large rust codebase from failure to anyhow/thiserror has been considered a large QoL improvement. I'd recommend investing time into doing the conversion.
Reply Retweet Označi sa "sviđa mi se" More
Benjamin Brittain 7. sij
Odgovor korisniku/ci @davidtolnay
Reply Retweet Označi sa "sviđa mi se"
Craig Tiller 7. sij
Odgovor korisniku/ci @Brittain_Ben
Can you expand on how QoL has improved?
Reply Retweet Označi sa "sviđa mi se"
Benjamin Brittain 7. sij
Odgovor korisniku/ci @invalidop
Multiple people have reached out about the improved readability of error messages. We interop with the standard trait now. We have a clean split between dynamic and structured error handling.
Reply Retweet Označi sa "sviđa mi se"
Benjamin Fry🦀👾⚙️ 8. sij
Odgovor korisniku/ci @Brittain_Ben
Honestly, I’m highly tempted to just drop back to std Error at this point. The number of time I’ve converted is getting a bit onerous.
Reply Retweet Označi sa "sviđa mi se"
Benjamin Brittain 8. sij
Odgovor korisniku/ci @benj_fry
std::error::Error is totally usable now! Maybe use `thiserror` to generate nice structured errors though.
Reply Retweet Označi sa "sviđa mi se"
Guillaume Gomez 8. sij
Odgovor korisniku/ci @Brittain_Ben
Urg, this whole error debate again... Using just the std errors was good enough for me and I don't have to migrate once a year to a new preferred way to handle them. :)
Reply Retweet Označi sa "sviđa mi se"
Benjamin Brittain 9. sij
Odgovor korisniku/ci @imperioworld_
Using std::error::Error is acceptable to me now! It wasn't in the past, but is good now. thiserror is a good choice for elegantly making those errors. anyhow is nice if you have dynamic errors. I don't feel this guidance is in conflict with your sentiment.
Reply Retweet Označi sa "sviđa mi se"
Jingjing Duan 16. sij
Odgovor korisniku/ci @Brittain_Ben
Is there a blog post written about this migration?
Reply Retweet Označi sa "sviđa mi se"
Benjamin Brittain 16. sij
Odgovor korisniku/ci @duanjingjing
Nope, but I'm more than happy to answer any questions you may have
Reply Retweet Označi sa "sviđa mi se"
ugh 7. sij
Odgovor korisniku/ci @Brittain_Ben
But literally everyone including you told me to use failure!
Reply Retweet Označi sa "sviđa mi se"
Benjamin Brittain 7. sij
Odgovor korisniku/ci @nvll
That was a while ago though! std::error::Error wasn't ready yet
Reply Retweet Označi sa "sviđa mi se"