News for hackers. Stuff that matters.
Re:Click by still_grokking on Saturday March 20, 2021 @12:57PM (#26524383)
Because let transformed = for(let i=0; i<n; ++i){something()}; doesn't work.

For loops are just clunky. They're not values, you can't pass them around or copy'n'paste them where the transformed value is needed.

Re:Click by eins1234 on Monday March 22, 2021 @08:32PM (#26549418)
This. Data and transformations on data (map, filter, reduce, etc) are trivially composable. Imperative loops are not (unless you abstract them away behind a function that accepts and returns data, in which case you'd be re-implementing map, filter, reduce with imperative loops).