3 ms·
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 {...}
by camkego 5y ago
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 {...}
- mseepgood 5y ago> 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-try-builtin.md 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-512035919 https://github.com/golang/go/issues/32437#issuecomment-51203...
- infogulch 5y agoGenerics 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.