Re: [go-nuts] stucked in the interface mud

2017-11-21 Thread 'Axel Wagner' via golang-nuts
This question is frequently asked . In short: Because the arguments to myType.Less have to be of type Compare, not myType. Go does not have polymorphic types. To answer the "how should this be done in Go the right way": IMO the answer is "not". The

Re: [go-nuts] stucked in the interface mud

2017-11-21 Thread Jan Mercl
On Tue, Nov 21, 2017 at 2:40 PM wrote: https://play.golang.org/p/InPAO_haLU works, but I don't think it's what you're after, because once more types implement Compare this approach gets dirty with type too many type switches. -- -j -- You received this message because you are subscribed to