Re:Ask HN: Why do functional programmers hate loops (for, wh...
by nullcipher on Tuesday July 11, 2023 @09:51AM
(#36680969)
Ah, i hate those coding styles where everything must use forEach/map/reduce
[ Parent
| on HN ]
Re:Ask HN: Why do functional programmers hate loops (for, wh...
by guilherme-puida on Tuesday July 11, 2023 @09:53AM
(#36680996)
forEach is still a loop
Re:Ask HN: Why do functional programmers hate loops (for, wh...
by nullcipher on Tuesday July 11, 2023 @09:55AM
(#36681030)
The 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
Re:Ask HN: Why do functional programmers hate loops (for, wh...
by guilherme-puida on Tuesday July 11, 2023 @02:01PM
(#36684781)
Sure, but `forEach` is not even in the same category as map/filter/reduce. `forEach` is in no may functional.
Re:Ask HN: Why do functional programmers hate loops (for, wh...
by nullcipher on Wednesday July 12, 2023 @10:53PM
(#36704503)
I mean just search for "is forEach functional programming"
Re:Ask HN: Why do functional programmers hate loops (for, wh...
by guilherme-puida on Friday July 14, 2023 @08:29AM
(#36722928)
forEach 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.