News for hackers. Stuff that matters.
Re:Twelve Years of Go by ohCh6zos on Wednesday November 10, 2021 @07:37PM (#29182985)
I suspect but do not know that multiple return values in a function combined with the inability to write functions against multiple return types like (T,error) will limit the usefulness of traditional iterators in Go. I'd love to be proved wrong as they'd really clean up my codebase though.
Re:Twelve Years of Go by grey-area on Saturday November 13, 2021 @03:11AM (#29208269)
Depends what you're doing I guess, not everything needs to return an error, and errors can be accumulated and stored during certain operations and dealt with at the end.