News for hackers. Stuff that matters.
Re:Go proposal: new package to provide generic slice functions by foldr on Wednesday May 05, 2021 @09:51AM (#27049779)
Reduce is basically "loop over this list while maintaining state". If you have loops and state built in, it doesn't buy you a whole lot.

I don't think the aim of the package is to move Go towards a more functional style. Rather, it's to provide a set of utility functions that mesh with the style of existing Go code. For example, it would be useful to have a utility to 'pop' an element from a slice, even though that's not a particularly functional idiom.

Re:Go proposal: new package to provide generic slice functions by sabellito on Wednesday May 05, 2021 @10:06AM (#27049964)
I definitely wasn't arguing about what should or should not be in the package. I just replied to the parent comment with my idea as to why the discussion around this point is happening in the proposal.