On Wed, Oct 19, 2016 at 8:58 PM Viktor Kojouharov <vkojouha...@gmail.com> wrote:
> Not really, as this is all hypothetical, it might be implemented in a way so that any type that wants to satisfy an interface with default methods has to at least implement all non-default ones. That is to say, with the above example interface, any and all types will be able to match, since the interface doesn't define any other methods (in a sense, it turns into interface{}). However, if a type wishes to define any method that has a default implementation, it can do so, and that implementation will be used. This can serve as a good answer to the question in the thread title. I mean, hypothetically allowing interface types as method receivers makes things less intuitive to use, more complex to specify, implement and understand to source code reader. -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.