News for hackers. Stuff that matters.
Re:Functional Programming in Go with Generics by skybrian on Thursday May 27, 2021 @12:20PM (#27304827)
That’s probably okay if the code is I/O bound anyway, but in Go it will run a lot slower than doing multiple steps within a single for loop.

For loops may be unfashionable but they aren’t hard to read.

Re:Functional Programming in Go with Generics by duped on Thursday May 27, 2021 @03:04PM (#27306807)
I don't find iterator combinations hard to read. Especially with postfix methods.

I do find deeply nested for loops with outer variables that might start uninitialized or need to be mutable much more difficult to read.

Re:Functional Programming in Go with Generics by skybrian on Thursday May 27, 2021 @04:04PM (#27307598)
Sometimes moving an inner for loop to a separate function (that will likely be inlined) is better to explicitly show its inputs and outputs.