News for hackers. Stuff that matters.
Re:Expectations for generics in Go 1.18 by camkego on Wednesday October 27, 2021 @10:49PM (#29021803)
Was the try() proposal for Go error handling? I'm really curious what happened to the proposals for shorter Go error handling, rather than if err!=nil {...}
Re:Expectations for generics in Go 1.18 by mseepgood on Wednesday October 27, 2021 @11:14PM (#29021969)
> Was the try() proposal for Go error handling?

Yes, it was the second proposal by the Go team for shorter error handling: https://github.com/golang/proposal/blob/master/design/32437-...

> I'm really curious what happened to the proposals for shorter Go error handling

The community didn't like it and it was declined: https://github.com/golang/go/issues/32437#issuecomment-51203...

Re:Expectations for generics in Go 1.18 by infogulch on Thursday October 28, 2021 @02:43AM (#29023107)
Generics took several iterations from the Go team to finally land on the current (pretty good, imo) design. I might expect error handling to also require multiple tries before it sticks. And we should probably wait for the dust to settle on generics a bit before proposing another design for error handling.