thanks for the link. unlike the onErr approach, my proposal does not treat create special-status identifier; the orelse block is like any other else block
On Sunday, July 30, 2023 at 1:31:09 AM UTC-6 Brian Candler wrote: On Sunday, 30 July 2023 at 06:57:15 UTC+1 DrGo wrote: I looked at the long list of proposals to improve error handling in go but I have not seen the one I am describing below. There is a meta-ticket here: https://github.com/golang/go/issues/40432 Under the section "Simplifications of if err != nil, to reduce boilerplate" I found a link to https://github.com/golang/go/issues/32946 which seems very similar to yours, using keyword "onErr" after a semicolon, instead of "orelse". if c, err := fn(); onErr { return 0, err } -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/42e423ec-914b-46a0-976d-5ea93d0231f1n%40googlegroups.com.