Re:Go 2 Draft Designs
by grey-area on Tuesday August 28, 2018 @03:07PM
(#17861875)
But isn’t it only to the immediate caller using the explicitly declared error, not all the way up the stack?
That’s very different behaviour and along with using the error interface avoids the main objections to exceptions ( unexpected throws handled far from the error location, unexpected errr types).
This is just a small change to make it easier to annotate and easier to return without comment.
Re:Go 2 Draft Designs
by grey-area on Wednesday August 29, 2018 @03:05AM
(#17866290)
That’s an invalid assumption, as most functions will not use check (looking at my code there are just a few places I’d use it). It’s an addition to current error handling, not a replacement.
That’s very different behaviour and along with using the error interface avoids the main objections to exceptions ( unexpected throws handled far from the error location, unexpected errr types).
This is just a small change to make it easier to annotate and easier to return without comment.