A Simpler Way to See Results

Logan Smith
Logan Smith
100.3 هزار بار بازدید - 12 ماه پیش - Result is Rust's error handling
Result is Rust's error handling type that is often discussed in the same (or similar) breath as Option, but it feels... scarier. But in this video, I'll argue that that relationship with Option is a useful piece to focus on; they are isomorphic in certain circumstances, and even when they're not, you can think of them as coexisting on a continuum. Then we'll talk about the dreaded/beloved question mark, FromIterator/collect, and some Error stuff.

Special guest appearances from anyhow, thiserror, derive_more, and boxed Error trait objects; Haskell do-notation, applicative functors, and the first official time I've ever said 'monad' on this channel; and more.

Links I promised:
Study of std::io::Error - https://matklad.github.io/2020/10/15/...
thiserror - https://docs.rs/thiserror/latest/this...

Other stuff:
Result module docs - https://doc.rust-lang.org/std/result/
Result chapter in the book - https://doc.rust-lang.org/book/ch09-0...
! - https://doc.rust-lang.org/std/primiti...
Haskell do notation - https://en.wikibooks.org/wiki/Haskell...
Sum type - https://en.wikipedia.org/wiki/Tagged_...
Isomorphism - https://en.wikipedia.org/wiki/Isomorp...
Bottom type - https://en.wikipedia.org/wiki/Bottom_...

I use the amazing Manim library for animating these videos, and I edit them with Blender and Audacity.
https://www.manim.community/
https://www.blender.org/
https://www.audacityteam.org/
12 ماه پیش در تاریخ 1402/05/05 منتشر شده است.
100,390 بـار بازدید شده
... بیشتر