3 ms·
If you're interested in writing code for maximum readability, might it be simpler to write for loops more often, rather than tricky type signatures?
by skybrian 8y ago
If you're interested in writing code for maximum readability, might it be simpler to write for loops more often, rather than tricky type signatures?
- steveklabnik 8y agoThis is up to taste; I find map/filter/collect/etc to be cleaner than a for loop 95% if the time. For that 5%, there’s still for loops.
- ealhad 8y agoThe problem of a for loop is actually that it's just a for loop. When you see filter, map, or max_by, you know what the code does right away.