EDIT: On further thought, the implications of using
iface.As, e.g., for
io.WriterTo are quite subtle. If you were trying, say, to add logging to all
Read calls, you wouldn't want to simply pass through to the underlying
io.WriterTo because the call would go unlogged. Instead you'd need to implement the
As method on your type so as to only return a
WriterTo under certain conditions. Still, I think this idea is worth exploring more.
Essentially the problem is this, many packages begin by requiring a certain interface, such as