Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Read the design draft (https://go.googlesource.com/proposal/+/master/design/go2draf...). The issues you raise are addressed.


Not quite. You'd need to write new `handle err { ... }` blocks for every new context, like how they have one in the for loop. In effect you're just moving the handling of the error away from the place it occurred, which is not optimal. As someone who writes Go every day I don't see this strategy effectively cutting down on boilerplate core or adding clarity.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: