News for hackers. Stuff that matters.
Re:Go Developer Survey 2022 Q2 Results by eikenberry on Thursday September 08, 2022 @01:18PM (#32768592)
> 1) Syntactic sugar for if err != nil { return err }; similar to ? in Rust

IMO they could exactly use what you wrote, ie. change gofmt to have it all on one line like that. The biggest annoyance with the error return boilerplate is the waste of vertical space and just squashing it into 1 line would fix that.

Re:Go Developer Survey 2022 Q2 Results by metaltyphoon on Thursday September 08, 2022 @04:09PM (#32771364)
Or perhaps allow variable assignment to be used in the same scope.

if x, err := someMethod(); err != nil { return err }

x <- is usable here.