[go-nuts] Cloud the current generic draft constraint a type parameter must be exactly some types

2020-09-18 Thread tapi...@gmail.com
instead of sharing the same underlying types with some 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. To view th

Re: [go-nuts] Cloud the current generic draft constraint a type parameter must be exactly some types

2020-09-18 Thread Ian Lance Taylor
On Fri, Sep 18, 2020 at 10:07 AM tapi...@gmail.com wrote: > > instead of sharing the same underlying types with some types? In the current design draft, the answer is yes, but only for non-predeclared defined types. https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-type-pa

Re: [go-nuts] Cloud the current generic draft constraint a type parameter must be exactly some types

2020-09-18 Thread tapi...@gmail.com
If sum types are supported can they can be used as general parameter types, then it is possible to declare overloaded functions/methods demoed in the end of this article