News for hackers. Stuff that matters.
Re:My Favorite Rust Function Signature by csears on Thursday September 17, 2020 @11:26AM (#24505801)
Really enjoyed seeing this broken down and explained. Is a function like that considered idiomatic Rust?
Re:My Favorite Rust Function Signature by steveklabnik on Thursday September 17, 2020 @11:27AM (#24505823)
Yep! See my comment about the lifetimes, though, you may not actually write them out in the real code, but conceptually, this is Rust's bread and butter.
Re:My Favorite Rust Function Signature by stack_underflow on Thursday September 17, 2020 @03:53PM (#24509166)
I'm learning Rust for the first time and found that The Rust Book does a pretty good job of covering language concepts. I actually just finished reading the section on lifetimes last night: https://doc.rust-lang.org/book/ch10-03-lifetime-syntax.html

My experience so far with Rust has been a huge reduction in mental burden/bookkeeping compared to when I write modern C++.