4 ms·
> or map-filter chains instead of for loops. Not a rust programmer - but this seems odd. Map/filter/reduce are high level abstractions that describe most commo
by reader_mode 6y ago
> or map-filter chains instead of for loops.
Not a rust programmer - but this seems odd. Map/filter/reduce are high level abstractions that describe most common operations you want to perform on sequence. It's non-trivial to infer from loop code (you need to scan at least multiple lines to confirm it's actually "just a map" or "just a filter", especially when you have more complex operation chains etc. and the mutable imperative nature of the code makes it even harder to reason about - more potential edge cases).
This is exactly the kind of stuff I don't want to do manually and expect the compiler to do at (near) zero cost - how can you "overuse" this ?