Re:Should Small Rust Structs be Passed by-copy or by-borrow?
by nicoburns on Sunday January 01, 2023 @10:16AM
(#34206911)
Yeah, I agree with that. Especially reduce/fold, which I find is almost always better written as loop. Filter would be a good example of the opposite for me: almost always much clearer written functionally.
My general rule is that if you need fewer lines of code to implement your logic with a simple for loop, you probably should.