Proposed new dependency: github.com/juju/errors (and github.com/juju/errgo)
Tim Penhey
tim.penhey at canonical.com
Thu May 29 03:03:39 UTC 2014
On 29/05/14 01:11, roger peppe wrote:
> Writing code to explicitly declare function return types is also
> a perpetual drag on refactoring, but it's also incredibly useful.
>
> The set of possible returned errors *should* be part of the contract
> of a function, otherwise how could you know that a given error might
> be returned?
This theory has also been applied to both Java and C++ in the past with
checked error types, and in both situations it ended up being unworkable
and discarded by both communities.
Tim
More information about the Juju-dev
mailing list