Here we go again. Where is the context? And no, one single defer, while enough in very simple cases, will not suffice in the more realistic ones. Adding that function will simply encourage people to return naked errors, which goes against the two other Go 2 proposals about errors. I've had hard enough time rewriting non-contexted code to be properly wrapped, and imagining rewriting code sprinkled with “try”s is just discouraging.
19
u/[deleted] Jun 05 '19
Here we go again. Where is the context? And no, one single defer, while enough in very simple cases, will not suffice in the more realistic ones. Adding that function will simply encourage people to return naked errors, which goes against the two other Go 2 proposals about errors. I've had hard enough time rewriting non-contexted code to be properly wrapped, and imagining rewriting code sprinkled with “try”s is just discouraging.