Not sure if anyone has already mentioned the possibility that "try" could actually improve error handling by simply removing much of the tediousness. Both reading and writing all the error checks becomes a nail in my eyes even if realize that it is very important. What if "try" could take some of that annoyance away and simply make me focus on handling the errors where appropriate and pass on where convenient?
On Tue, Jul 9, 2019 at 1:57 PM Jan Mercl <0xj...@gmail.com> wrote: > On Tue, Jul 9, 2019 at 1:48 PM Nicolas Grilly <nico...@vocationcity.com> > wrote: > > > The goal of the try proposal is not to "save a few keystrokes". The > goal is to reduce error handling verbosity when reading code. > > It's not verbosity. It's error handling. And because error handling is > usually not the happy path, it's good when it stands out clearly. That > improves readability as the important part catches attention easier. > > Hiding important code in one line instead, or with even using nested > try constructs, makes the important path easier to overlook or to not > be aware of it at all. For me personally, try buys zero advantages at > the cost of several disadvantages. > > PS: Maybe we all somehow confuse readability with comprehensibility. > > -- > 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/CAA40n-W50W92FEKhf4tbSR%3D6wFr3Cc5u1QVWu%2BXnwQWpUCaMQw%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAKOF697rVz9jAWXJ%3DWbhBjzhokrJrFbngW4fwwe6W08Pup-dgA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.