Re:Rust vs. Go in 2023
by bryanlarsen on Sunday August 13, 2023 @10:07AM
(#37110168)
The thing about clone and to a lesser extent unwrap is that 90% of the time, just leaving in the clone is fine. It might be suboptimal, but if it's not in the main loop, who cares?
With unwrap, replacing the unwrap with an expect signals you've accepted that an unwrap is ok in that piece of code. I'd like a similar convention for clone.
Re:Rust vs. Go in 2023
by kaba0 on Sunday August 13, 2023 @10:29AM
(#37110354)
If that’s the case, then Scala and similar should also enter the question. That is at least an expressive language compared to Go, and if you don’t need rust’s performance it may be a good tradeoff.
With unwrap, replacing the unwrap with an expect signals you've accepted that an unwrap is ok in that piece of code. I'd like a similar convention for clone.