News for hackers. Stuff that matters.
Re:Three Minor Features in Go 1.18 by dragonwriter on Wednesday December 22, 2021 @11:57PM (#29658805)
I find map/filter/reduce much easier to read if it is being used for a functional map, filter, or reduce operation or something not too distant from it.

> A straight for loop is infinitely better in every way.

A straight for, for-of, or for-in loop, as appropriate, is finitely better for imperative operations that don't naturally fit map/filter/reduce but need to be performed over some set of values.

Re:Three Minor Features in Go 1.18 by scns on Thursday December 23, 2021 @04:05AM (#29660051)
This. Saw a reduce once which contained a lambda one screen long. It gets worse, it contained another reduce...

Ah, and a map that performed side effects.

Re:Three Minor Features in Go 1.18 by hsn915 on Thursday December 23, 2021 @08:50AM (#29661777)
A one line map or filter is ok.

Other than that it's unreadable.