[go-nuts] Re: YAEHI (Yet another error-handling idea)

2019-06-30 Thread Andrey Tcherepanov
I think it is no different from regular "if err != nil {}" handling, sorry My thought behind ? is to make is working for a simple cases. If you are doing an error translation/transform/wrapping - this is a case that I feel is better handled by existing explicit "if err != nil" construct. A. On

[go-nuts] Re: YAEHI (Yet another error-handling idea)

2019-06-30 Thread mh cbon
f := file.Open() ? error { //f is nill return erors.Wrap("nop",err) } defer f.Close() On Saturday, June 29, 2019 at 11:56:09 PM UTC+2, Andrey Tcherepanov wrote: > > Hello mighty fighters of errors! > > Here comes my half-thought idea of another way to express error handling: > > *Add a postfix '?'