Re:Rust – A hard decision pays off
by throwaway894345 on Wednesday August 24, 2022 @04:58PM
(#32585659)
I mean, I definitely have tried to rewrite stuff as iterators even when it isn't convenient. I only got to that working example by dedicating a few hours with the good people on the Rust Discord trying to make it work (a lot of seasoned Rustaceans also weren't able to get it working, it was a collaborative effort that took a fair amount of time and rhapsodizing). And even then, the result is pretty ugly (I don't think many seasoned Rustaceans would call it "idiomatic" or advise the first version over the second).
[ Parent
| on HN ]
Re:Rust – A hard decision pays off
by mustache_kimono on Wednesday August 24, 2022 @06:09PM
(#32586445)
Agreed. Your example is a pretty pathological case, but yeah.