On Wed, Sep 12, 2018 at 6:34 AM Ian Lance Taylor <i...@golang.org> wrote:
> That said, if we move forward with something like contracts, I think > that it may be possible to introduce contract adaptors in the future: > a mechanism that says "if the type argument does not implement > contract C1, but does implement contract C2, then use this code to > implement the requirements of C1 in terms of C2." This sort of > automatically applied adaptor code seems to me to be less potentially > confusing than metaprogramming. Maybe. I'm not at all sure. > Yes. I've been toying (just in my head) with an idea for using adaptors instead of contracts, and then building support into the language for automatically choosing a default adaptor. I guess I'll have to write up the idea so people can evaluate it. That will take a day or three. -- 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.