This advice is unfortunate. When you return an interface, you bar the compiler from analyzing the underlying implementation (e.g. escape analysis). The examples they give -- hashing and encryption -- are two places where this matters the *most*! https://golang.org/doc/effective_go.html#generality … #golang
In practice, returning an interface from a constructor is almost never The Right Thing To Do. Off the top of my head, the only two good examples in the stdlib are: - net.Dial/net.Listen (since they can use either TCP or UDP) - Helpers in io that just wrap other Readers/Writers