2 ms·
I mean, sure, but the opposite is also true: Sometimes people make complicated incantations inside for loops (or worse, while loops) that could be replaced by
by ratww 5y ago
I mean, sure, but the opposite is also true:
Sometimes people make complicated incantations inside for loops (or worse, while loops) that could be replaced by simpler functional constructs. In these cases, map and friends are easier to read.
The problem here is not one construct or the other, but the fact some people are making code that is hard to understand. There's no one size fit all solution.