8 ms·
Ah, i hate those coding styles where everything must use forEach/map/reduce
by nullcipher 3y ago
Ah, i hate those coding styles where everything must use forEach/map/reduce
- guilherme-puida 3y agoforEach is still a loop
- nullcipher 3y agoThe functional programmers (in my circle) have latched on to forEach/map/reduce/filter etc as the bibile of functional programming. Writing a simple for..each loop will make them reject PRs
- guilherme-puida 3y agoSure, but `forEach` is not even in the same category as map/filter/reduce. `forEach` is in no way functional.
- nullcipher 3y agoI mean just search for "is forEach functional programming"
- guilherme-puida 3y agoforEach is just an alternate syntax for a for..in loop, that instead of being a block it takes a closure. It's not functional, since it's only used for side-effects.