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 <https://github.com/go101/go101/wiki/A-proposal-to-avoid-duplicating-underlying-bytes-when-using-strings-as-read-only-%5B%5Dbyte-arguments>.
This might be good for some scenarios. On Friday, September 18, 2020 at 1:31:10 PM UTC-4 Ian Lance Taylor wrote: > On Fri, Sep 18, 2020 at 10:07 AM tapi...@gmail.com <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-parameters.md#type-lists-in-interface-types > > Ian > -- 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/d7a14e4b-51e4-491d-a86b-ac1928c30642n%40googlegroups.com.