On Mon, Aug 31, 2020 at 7:32 AM Zakaria <z4k4...@gmail.com> wrote: > If the objections on the too magical handle part, why not cut that part > and retain the check part? >
The objection was mainly on the too magical check part, AIUI. > > Most of the time the we just forward the error on to the next level > anyway. Handling error is rarely done and should be explicit. > > I got better keyword for this: reterr > A portmanteau of return error. > > Pada tanggal Sen, 31 Agt 2020 10.34, Ian Lance Taylor <i...@golang.org> > menulis: > >> On Sun, Aug 30, 2020 at 7:16 PM Zakaria bin Haris <z4k4...@gmail.com> >> wrote: >> > >> > Idk if this has been proposed or discussed before. >> > >> > Given the last error handling abbreviation proposal is rejected. How >> about some simple syntactic sugar like this: >> > >> > rin Something() >> > >> > Which is just a sugar for: >> > >> > if err := Something(); err != nil { >> > return err >> > } >> > >> > To make it worth the new keyword make it so that: >> > >> > rin v := Something() >> > >> > equals to: >> > >> > v, err := Something() >> > if err != nil { >> > return err >> > } >> >> This is similar to the check/handle design draft, without the handle. >> You may want to take a look at https://golang.org/issue/40432. >> Thanks. >> >> Ian >> > -- > 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/CAET7USmazC1m-sWrXahCOptL2uGi5x2Xei2KySNx2Pc9ro9ipA%40mail.gmail.com > <https://groups.google.com/d/msgid/golang-nuts/CAET7USmazC1m-sWrXahCOptL2uGi5x2Xei2KySNx2Pc9ro9ipA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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/CAEkBMfEOAoXQmQPebRFYS7NpGXyyLzeZFoQSA%3DyC86zCbbz_gw%40mail.gmail.com.