On 11 September 2018 at 22:17, jimmy frasche <soapboxcic...@gmail.com> wrote: > I think it would work with interfaces if the interfaces (generic or > not) can themselves specify generic methods, like > > interface { > Foo(type T)(T) T > }
The problem with that is, as is pointed out in the draft proposal, that if you allow dynamic calls of type-parameterised methods, you can't easily statically determine the set of possible parameter types, so could lead to very inefficient code because it would need to be compiled generically for every possible set of parameter types. -- 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.