once i found out about this syntax i was able to get rid of quite a few `var err error` that i had sprinkled around the more complex functions. very nice feature
@whitequark I have written Go professionally and I don't know what to expect this code to do. Are even those bool's passed by reference? I don't like the idea that any callee could change anything I pass. (TBF I don't claim to have mastered Go, or even to have used more than half of it)
@whitequark personally I'd be a lot more jazzed about it if it didn't create a common code pattern as standard which is IMO the third worst way to propagate errors
@cliffordheath Go doesn't have references like C++ (almost nothing does really...); there are two things happening in here. 1. the three results are given names. in the context where this is likely the most useful, interface declarations, the names have no semantic meaning 2. this is a normal function, so there is a semantics. the variables `t`, `before`, `after` appear in the local scope of the function (just like arguments, but always zeroed), and the argument of `return` may be omitted
@cliffordheath I think that in a language that lacks ADTs and keyword arguments and has a bad habit of using the `bool` type, at least having lightweight syntax to name them in return values is extremely important. the `return` trick is sometimes nice when you're wrangling lots of error handling and it is best written in a stateful way