This is not quite true. The language itself doesn't make claims other than types and method names. However, there are conventions around the semantics of methods in an interface. For example, a Read method that returns 0, nil is allowed for io.Reader, but frowned upon unless the buffer is zero length, and a Read method that fills the buffer with n bytes and returns n-1 (or n+1), nil is not a correct implementation of io.Reader. Nor is an implementation correct if it retains the buffer.
Just as the BDNF is not a complete definition of the grammar of the language, interface type decls are not complete definitions of interfaces. This is why I am asking. On Sun, 2019-05-12 at 20:16 -0500, robert engels wrote: > There is no claim because that is not how Go interfaces work -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1557712717.21310.68.camel%40kortschak.io. For more options, visit https://groups.google.com/d/optout.