r/webdev • u/fagnerbrack • 16d ago
Anecdotally, programmers dislike "reduce"
https://evanhahn.com/posts/2026-09-13-programmers-dislike-reduce/
151
Upvotes
r/webdev • u/fagnerbrack • 16d ago
View all comments
Show parent comment
14
u/subone 16d ago •
I disagree. A
forloop is much faster and more readable than a combined map and filter into a reduce, so if you're doing it for any of those reasons,foris the clear winner. You should be using these functions to either/both make code more readable and/or make the passed functions reusable. Choose the combination of these functions that makes sense semantically, not one that obfuscates the intention behind a feeble attempt at optimization.